Ani*_*kib 7 model validationrules yii2
我有一个带有验证规则的模型,例如:
[['x'], 'integer'],
[['x'], 'unique'],
Run Code Online (Sandbox Code Playgroud)
现在我该如何添加如下规则:
x <100
或类似
x> = 100
aro*_*hev 11
它应该是:
['x', 'compare', 'compareValue' => 100, 'operator' => '<'],
Run Code Online (Sandbox Code Playgroud)
和
['x', 'compare', 'compareValue' => 100, 'operator' => '>='],
Run Code Online (Sandbox Code Playgroud)
因此.
阅读官方文档中的更多内容.