konapaz
(Konapaz)
1
Hi,
The gii generates for mysql Decimal types the rule
array('length', 'max' => 'a number')
(according of digits) in the Model
instead of float type that adds
array('merchant_price', 'type', 'type'=>'float')
, (I read that in another post - I din’t tested it)
In normal way the gii should be generates for decimal type the same thing that float type does
what is the problem ?
Thanks!
johnsnails
(Johnwales Jw)
3
I have just noticed the same issue… I am setting up a rule in the model that enforces the type of decimal I am after using a regular expression.
array('merchant_price', 'match', 'pattern' => 'REGULAR EXPRESSION GOES HERE', 'message'=>'You have not entered a valid price!')
Although judging by your # of posts Im guessing I haven’t told you anything even close to new 
konapaz
(Konapaz)
4
Sure… there are many ways to do a validation,
The point is the Gii should be generate a validation automatically.
I hope will be happen in Yii 2…