Can we validate date and show custom messages using java script?
One answer
The Script-based Validator is supposed to support "any attribute type" so it could be your only choice if JavaScript is required.
Comments
The JavaScript attribute customization ( https://jazz.net/library/article/1003 ) API basically only really supports text based items. String or enumerations https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript . Complex items are generally not claimed to be supported and you have mixed results if you try. E.g. for contributors.
The JavaScript API however also allows the conversion of timestamps so you can use JavaScript against the text representation.
Valication can show validation warnings or errors in the UI.