public function validate($validator)
    {
        if ($this->checkHostname($this->Value())) {
            return true;
        }

        $validator->validationError(
            $this->getName(),
            _t('DomainNameField.INVALID_DOMAIN', 'Invalid domain name'),
            'validation'
        );
        return false;
    }
public function validate($validator)
    {
        if ($this->checkHostname($this->Value())) {
            return true;
        }

        $validator->validationError(
            $this->getName(),
            _t('DomainNameField.INVALID_DOMAIN', 'Invalid domain name'),
            'validation'
        );
        return false;
    }
public function validate ( $ validator ) { if ( $ this -> checkHostname ( $ this -> Value ( ) ) ) { return true ; } $ validator -> validationError ( $ this -> getName ( ) , _t ( 'DomainNameField.INVALID_DOMAIN' , 'Invalid domain name' ) , 'validation' ) ; return false ; }
Validate this field as a valid hostname

@param Validator $validator
@return bool
Validate this field as a valid hostname