I'm trying to validate an optional field with the validation plugin,
using a custom method. Here's the code:

rules: {
   birthdate: { validBirthdate:true }
},
messages: {
    birthdate: {
        validBirthdate: "Invalid birthdate"
    }
}

How do I make this field optional? I only want to check the birthdate
if the user has provided one. (I'm aware of the "date" method, but I'm
purposely using a custom method).

Reply via email to