I was tired of users entering wrong birth dates while joining if they don't use the date picker control. So i created a simple function that stops them to submit the form if it is an invalid date.
Add this function to the end of /inc/design.inc.php right before the ?>
function checkDateTime($data) {
if (date('Y-m-d', strtotime($data)) == $data) {
return true;
} else {
return false;
}
}
Then go to dolphins admin area -> Builders -> Profile Fields -> Join Form
Click on the DateOfBrith Field and select "Advanced" Tab.
Put this into the "Check" field and save the field.
return (bool) (checkDateTime($arg0));
Next add a language key with the name _FieldError_Email_Check and put in something like "Invalid Date"
I still use 7.0.9 so i don't know if something changed with 7.1.0 but it should work there too.