trav1 Posted December 12, 2010 Share Posted December 12, 2010 Hello everybody, I hope this is the right forum/place to ask this kind of question. :-) I would like to know how can I validate (i mean, for example, check if the user selected something from every select menu) a date (dFY) which has been added like this : $form->addElement('date', 'dob', ENTRY_DATE_OF_BIRTH, array('format'=>'d-F-Y', 'language'=> $lng->language['code'], 'minYear'=>1900, 'maxYear'=> date('Y'), 'addEmptyOption'=>'true', 'emptyOptionText'=>'-', 'emptyOptionValue'=>'-' ) ); I tried with these rules but it seems that it doesn't work: $form->addGroupRule('dob', stripslashes(ENTRY_DATE_OF_BIRTH_ERROR), 'callback', 'dobCheck'); or $form->addRule('dob', stripslashes(ENTRY_DATE_OF_BIRTH_ERROR), 'number'); or (for every select) $form->addRule('dob[d]', stripslashes(ENTRY_DATE_OF_BIRTH_ERROR), 'nonzero', null, 'client'); I have php-pear-1.4.9-4 and HTML_QuickForm 3.2.11. Thankx, Trav Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.