package | Default |
---|
validateAttribute(\CModel $object,string $attribute)
If there is any error, the error message is added to the object.
Throws |
|
---|
\CModel
the object being validated
string
the attribute being validated
compareValue :string
var | the constant value to be compared with |
---|
string
allowEmpty :boolean
var | whether the attribute value can be null or empty. Defaults to false. If this is true, it means the attribute is considered valid when it is empty. |
---|
boolean
operator :string
var | the operator for comparison. Defaults to '='. The following are valid operators:
|
---|
string