public validate ( array $attributeNames = null, boolean $clearErrors = true ) : boolean | ||
$attributeNames | array | list of attribute names that should be validated. If this parameter is empty, it means any attribute listed in the applicable validation rules should be validated. |
$clearErrors | boolean | whether to call [[clearErrors()]] before performing validation |
return | boolean | whether the validation is successful without any error. |