Optional SharePoint Date field validation

I have a SharePoint date field on a form and it is Optional. If a user keys in an invalid date or a date in the mm/dd/yy format instead of mm/dd/yyyy and you save the form it just blanks out the field. No error message. In another post it appeared you were saying you needed to make the field required to do validation? If you use a validator the field is already blank by the time it gets to the validate function so you can't even check it there. How can I validate an Optional date field if the user tries to key in a date. Thanks!

Hello @dpeete,

You can check if the user changed the Date field and if yes, add a validator. Please see the code example in this post: