It’s not even full client-side validation – it’s just a subtle usability enhancement, implemented in an accessible way, which (as I discovered while testing the script) is almost identical to something that Firefox now does natively!In recent versions of Firefox, if a then the field will show a red outline, as illustrated by the following figure. If it did, then every required field would have that outline by default.Are you, for example, reading a random string and want to test if it meets a certain date pattern? For most date logic: if you can read/input stuff into the "Date" metadata format, then you can use a lot of existing Steps to perform various logic on it.If you are aware of the trade-offs of using the Java Script step and still want to explore what's available...Folks on the forum may (rightfully) suggest looking at other PDI Steps to help with date validation before trying Java Script Step.Can you update your post to help describe what you mean by "validate date"?
Such a script is beyond the scope of this article, but if you wanted to develop it further, all of the basic blocks are there – testing whether a field should be validated, validating a field against a pattern and/or required, and binding trigger events.
Now that we have the static code, we can add the scripting.
The first thing we’ll need is a basic property (the dot property only matches states which are set through scripting).
For legacy browsers that don’t implement these attributes, we can use their values as the basis of a polyfill.
We can also use them to provide a more interesting enhancement – instant form validation.