So i am looking to see if validation can be added using JS.
Basically when a user clicks on Save button on the new item form, the code should check if Due date field is populated or not, if not then it should show a message in red that you cannot leave due date empty.
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.
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?
Now that we have the static code, we can add the scripting.
We can also use them to provide a more interesting enhancement – instant form validation.Once we’ve got those utilities we can define the main validation function, which tests the field and then performs the actual validation, if applicable: attribute to indicate that state – adding it to an invalid field that doesn’t already have it, or removing it from a valid field that does. Finally, to put this all into action, we need to bind the validation function to an .We could just choose to ignore those browsers, but I think that would be a shame, especially when the problem is so simple to workaround.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"?
then I suggest looking first at the various Transform functions available in the step.