Commit a16c2eb6 by Qiang Xue

Use proper error message.

parent 2acf0b31
......@@ -78,8 +78,7 @@ class NumberValidator extends Validator
{
$value = $object->$attribute;
if (is_array($value)) {
$this->addError($object, $attribute, Yii::t('yii', '{attribute} is invalid.'));
$this->addError($object, $attribute, $this->message);
return;
}
$pattern = $this->integerOnly ? $this->integerPattern : $this->numberPattern;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment