Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>For built-in validators in general you can customize error messages by setting the <a href="http://www.yiiframework.com/doc/api/1.1/CValidator#message-detail" rel="nofollow"><code>message</code></a> property of the validation when defining the rule within your model's <code>rules()</code>.</p> <p>Some built-in validators have additional specific error messages that you can set, for example <a href="http://www.yiiframework.com/doc/api/1.1/CNumberValidator" rel="nofollow"><code>CNumberValidator</code></a> also has the properties <a href="http://www.yiiframework.com/doc/api/1.1/CNumberValidator#tooSmall-detail" rel="nofollow"><code>tooSmall</code></a> and <a href="http://www.yiiframework.com/doc/api/1.1/CNumberValidator#tooBig-detail" rel="nofollow"><code>tooBig</code></a>. For validators with additional error messages, these are mentioned prominently in the validator's reference documentation.</p> <p>When using custom validation rules you specify the error message explicitly using <a href="http://www.yiiframework.com/doc/api/1.1/CModel#addError-detail" rel="nofollow"><code>CModel::addError</code></a> or <a href="http://www.yiiframework.com/doc/api/1.1/CValidator#addError-detail" rel="nofollow"><code>CValidator::addError</code></a>, so again you have full control over it.</p> <p>When displaying input forms you can customize the CSS class of various elements by using the properties <a href="http://www.yiiframework.com/doc/api/1.1/CHtml#errorCss-detail" rel="nofollow"><code>CHtml::errorCss</code></a> (CSS class for an input element that has an error), <a href="http://www.yiiframework.com/doc/api/1.1/CHtml#errorMessageCss-detail" rel="nofollow"><code>CHtml::errorMessageCss</code></a> (class for the error message that displays next to the input element) and <a href="http://www.yiiframework.com/doc/api/1.1/CHtml#errorSummaryCss-detail" rel="nofollow"><code>CHtml::errorSummaryCss</code></a> (class for the error summary that usually appears on top of the form if you choose to print it). Since Yii 1.1.13 you can also customize <a href="http://www.yiiframework.com/doc/api/1.1/CHtml#errorContainerTag-detail" rel="nofollow"><code>CHtml::errorContainerTag</code></a> to select the tag name for each validation error message (this tag will get the <code>errorMessageCss</code> class).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload