I have a form which submits a date and I’m using the CJuiDatePicker plugin. It works fine without validation, however, I would like to validate the input and allow the user to submit multiple formats: a year(YYYY); a year and month (YYYY-MM); or a full date (YYYY-MM-DD). I know i could use regular expressions, but don’t know where to place it in the model.
I have no problem with the form, I only want to know how to validate the input.
I’m a little new to Yii, so i need your help.