<?php
class User extends AppModel {
var $name = 'User';
var $validate = array(
'username' => '/^[a-z0-9\_\-\.]{5,40}$/i',
'password' => array(
'rule' => 'notEmpty',
'message' => 'Please enter a valid user',
),
'firstname' => array(
'rule' => 'notEmpty',
'message' => 'Please enter a valid name',
),
'lastname' => array(
'rule' => 'notEmpty',
'message' => 'Please enter a valid description',
),
'gender' => array(
'rule' => 'notEmpty',
'message' => 'Please enter a valid description',
),
'birthday' => array(
'rule' => 'notEmpty',
'message' => 'Please enter a valid description',
),
'location' => array(
'rule' => 'notEmpty',
'message' => 'Please enter a valid description',
),
'email' => array(
'rule' => 'notEmpty',
'message' => 'Please enter a valid email',
)
);
On Wednesday, September 26, 2012 1:57:12 AM UTC-7, Chris wrote:
hi guys,... I have a old version of script written in 1.2 pre-Beta and want to migrate to 1.3,... and have a User Model:<?phpclass User extends AppModel {var $name = 'User';var $validate = array('username' => '/^[a-z0-9\_\-\.]{5,40}$/i','password' => VALID_NOT_EMPTY,'firstname' => VALID_NOT_EMPTY,'lastname' => VALID_NOT_EMPTY,'gender' => VALID_NOT_EMPTY,'birthday' => VALID_NOT_EMPTY,'location' => VALID_NOT_EMPTY,'email' => VALID_EMAIL);and having error: undefined constant VALID_NOT_EMPTYhow can I change for CAKE 1.3 ???thanks
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
No comments:
Post a Comment