protected function validate($value)
    {
        $value = trim($value);

        if ($value === '') {
            throw new EmptyValueNotAllowedException($this->getValueName());
        }

        return $value;
    }
protected function validate($value)
    {
        $value = trim($value);

        if ($value === '') {
            throw new EmptyValueNotAllowedException($this->getValueName());
        }

        return $value;
    }
protected function validate ( $ value ) { $ value = trim ( $ value ) ; if ( $ value === '' ) { throw new EmptyValueNotAllowedException ( $ this -> getValueName ( ) ) ; } return $ value ; }
Validates given value.
Basic implementation is validating against an empty string,
but is overridden when checking values more specific.

When valid returns given value.
When not valid an exception is thrown.

@param string|int $value Validated value.
@return string
@throws EmptyValueNotAllowedException
Validates given value . Basic implementation is validating against an empty string but is overridden when checking values more specific .