Это мое правило()
Код: Выделить всё
return [
[['price'], 'required', 'message' => 'Price ...'],
[['price'], 'number', 'numberPattern' => '/^[0-9]{1,2}([\.,][0-9]{1,2})*$/',
'message' => 'Price ...', 'max' => 25, min => '0'],
];
Подробнее здесь: https://stackoverflow.com/questions/389 ... validation