Yii validation Form in Model
===============================================
Go to your model file and find function
public function rules() {
return array(
array('firstname, lastname, email, username,password,address1,phone, mobile,is_active','required'),
array('firstname, lastname, email, username, password, address1, address2', 'length', 'max'=>255),
array('email','email'),
array('phone, mobile', 'length', 'max'=>11),
array('mobile', 'numerical', 'integerOnly'=>true),
array('phone', 'numerical', 'integerOnly'=>true),
array('is_active', 'length', 'max'=>8),
array('created_at, updated_at', 'default', 'setOnEmpty' => true, 'value' => null),
array('r_password', 'compare','compareAttribute'=>'password',),
array('id, firstname, lastname, email, username, password, address1, address2, phone, mobile, extra, is_active', 'safe', 'on'=>'search'),
);
}
That's interesting! Can you please share more about it? Thank you.
ReplyDeleteYii Framework Development Company – Nintriva
yurtdışı kargo
ReplyDeleteresimli magnet
instagram takipçi satın al
yurtdışı kargo
sms onay
dijital kartvizit
dijital kartvizit
https://nobetci-eczane.org/
7BV4VU
شركة تسليك مجاري بالاحساء mLjcFncemW
ReplyDelete