protected function compileSame($key, $masque)
    {
        if (!preg_match("/^same:(.+)$/", $masque, $match)) {
            return;
        }

        $value = (string) end($match);

        if ($this->inputs[$key] == $value) {
            return;
        }

        $this->last_message = $this->lexique('same', [
            'attribute' => $key,
            'value' => $value
        ]);

        $this->fails = true;
        $this->errors[$key][] = [
            "masque" => $masque,
            "message" => $this->last_message
        ];
    }
protected function compileSame($key, $masque)
    {
        if (!preg_match("/^same:(.+)$/", $masque, $match)) {
            return;
        }

        $value = (string) end($match);

        if ($this->inputs[$key] == $value) {
            return;
        }

        $this->last_message = $this->lexique('same', [
            'attribute' => $key,
            'value' => $value
        ]);

        $this->fails = true;
        $this->errors[$key][] = [
            "masque" => $masque,
            "message" => $this->last_message
        ];
    }
protected function compileSame ( $ key , $ masque ) { if ( ! preg_match ( "/^same:(.+)$/" , $ masque , $ match ) ) { return ; } $ value = ( string ) end ( $ match ) ; if ( $ this -> inputs [ $ key ] == $ value ) { return ; } $ this -> last_message = $ this -> lexique ( 'same' , [ 'attribute' => $ key , 'value' => $ value ] ) ; $ this -> fails = true ; $ this -> errors [ $ key ] [ ] = [ "masque" => $ masque , "message" => $ this -> last_message ] ; }
Compile Some Rule

[same:value] Check that the field contents are equal to the mask value

@param string $key
@param string $masque

@return void
Compile Some Rule