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.
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.
Check out the concept of 'Regular Expressions' if you haven't already, and see how you can use this in the Data Validator step.
Outgoing Stream On Error from Select Values, send to Set Field Value (set the field to null) and then redirect it back into the Outgoing Steam.
Is it a string/text column you wish to validate matches that pattern? Do you wish to make it a string/text for output, do you wish to make it a Date format?
For example, I’ve seen forms where it’s impossible to ) to force the focus to stay inside the field until it’s valid.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...For example, March 30 is a real date, but February 30 doesn’t exist. I stumbled upon this set of Java Script methods that validates dates (including checking for leap years).Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.