Hey all, I cant seem to find anything online to explain this so i'm hoping you all can help a bit.
I am validating credit card information and right now i'm working on ensuring the user enters an expiration date. For this i have to fields one for month and one for year both using $form->input('type'='date') When they post the data looks like [ExpirationMonth] { [month]=>XX }, [ExpirationYear] { [year]=>XXXX} On the back end I'm trying to validate this and it doesnt want to work. My validate array looks like this. 'ExpirationMonth.month'=>array( 'numeric'=>array( 'rule'=>'numeric', 'allowEmpty'=>false, 'required'=>true, 'message'=>'ExpirationMonthInvalid' ), 'between'=>array( 'rule'=>array('between', 1, 12), 'allowEmpty'=>false, 'required'=>true, 'message'=>'ExpirationMonthInvalid' ), ), 'ExpirationYear.year'=>array( 'notEmpty'=>array( 'rule'=>'notEmpty', 'allowEmpty'=>false, 'required'=>true, 'message'=>'ExpirationYearInvalid' ), 'numeric'=>array( 'rule'=>'numeric', 'allowEmpty'=>false, 'required'=>true, 'message'=>'ExpirationYearInvalid' ) ) no matter what i do i don't get an error message back. To clarify a bit more i have a 'empty'=>'Choose Month (or year)' in the drop downs so I'm just trying to make sure the user selected something other than that option. Any ideas? --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---