I have a model with a validation rule like:
[['x'], 'integer'],
[['x'], 'unique'],
Now how can I add a rule like:
x < 100
or something like
x >= 100
It should be:
['x', 'compare', 'compareValue' => 100, 'operator' => '<'],
and
['x', 'compare', 'compareValue' => 100, 'operator' => '>='],
accordingly.
Read more in official docs.