Yii Framework Forum: Gii Not Generates Normal Mysql Decimal Rules - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Gii Not Generates Normal Mysql Decimal Rules The rules same with float Rate Topic: -----

#1 User is offline   Kostas Apazidis (KonApaz) 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,332
  • Joined: 21-February 11
  • Location:Greece

Posted 10 April 2013 - 12:58 PM

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!
Yii is the best php framework in the world!
It is also powerful and flexible for large scale websites
find our demo Yii extension on www.webkit.gr
Is it post useful? please v++ ;)
0

#2 User is offline   Kostas Apazidis (KonApaz) 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,332
  • Joined: 21-February 11
  • Location:Greece

Posted 13 April 2013 - 02:08 AM

Anyone?
Yii is the best php framework in the world!
It is also powerful and flexible for large scale websites
find our demo Yii extension on www.webkit.gr
Is it post useful? please v++ ;)
0

#3 User is offline   johnsnails 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 64
  • Joined: 05-September 11
  • Location:Sydney Australia

Posted 29 January 2014 - 11:40 PM

View PostKonApaz, on 13 April 2013 - 02:08 AM, said:

Anyone?


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 :P
0

#4 User is offline   Kostas Apazidis (KonApaz) 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,332
  • Joined: 21-February 11
  • Location:Greece

Posted 30 January 2014 - 04:02 PM

View Postjohnsnails, on 29 January 2014 - 11:40 PM, said:

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 :P


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...
Yii is the best php framework in the world!
It is also powerful and flexible for large scale websites
find our demo Yii extension on www.webkit.gr
Is it post useful? please v++ ;)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users