public function validate($validator)
    {
        if(!empty ($this->value) && !preg_match('/^fa-[a-z]+/', $this->value))
        {
            $validator->validationError(
                $this->name,
                _t('FontAwesomeIconPickerField.VALIDFONT', 'Please enter a valid Font Awesome font name format.'),
                'validation',
                false
            );
            return false;
        }
        return true;
    }
public function validate($validator)
    {
        if(!empty ($this->value) && !preg_match('/^fa-[a-z]+/', $this->value))
        {
            $validator->validationError(
                $this->name,
                _t('FontAwesomeIconPickerField.VALIDFONT', 'Please enter a valid Font Awesome font name format.'),
                'validation',
                false
            );
            return false;
        }
        return true;
    }
public function validate ( $ validator ) { if ( ! empty ( $ this -> value ) && ! preg_match ( '/^fa-[a-z]+/' , $ this -> value ) ) { $ validator -> validationError ( $ this -> name , _t ( 'FontAwesomeIconPickerField.VALIDFONT' , 'Please enter a valid Font Awesome font name format.' ) , 'validation' , false ) ; return false ; } return true ; }
Ensure the value is a valid Font Awesome value beginning with 'fa-'
@see FormField::validate()
Ensure the value is a valid Font Awesome value beginning with fa -