javascript validation (version 10)


I read a lot of articles on js validation, but some are old posts, some are not very clear, and I'm not really getting a good insight. Say I have a js file with a lot of validationfunctions (like isValidIBAN, isValidPostalCode, isGreaterThan etc.). How to use such a (functions)file (I know how to load it) in OS to call the validationfunctions on Form validation? is there also the possibility to use the standard (for serverside) validation messages / how to mimic that? So for the user it must be the same look and feel.

An example would be appreciated.

Regards, Harry 


Hi Broer,

You can always create server actions and set is as a function that returns value true or false. 

Then you can use IF-widget then based on the retun value, tu can set the widget.valid and widget message just in case it is invalid:

isOK is the server action that returns boolean value:

and the Assign is something like this:



Hi Barong,

This seems to be server side. How to use the call to the js function on that field and set it to valid or invalid ? 

Regards, Harry

Hi Harry,

Sorry I misunderstood your question. As i know, for client side validation, the OS provides Javascript validation if we set the mandatory property to true (same look and feel). However, I do not know for custom JS function like you said above.

I think your idea is good and you can drop it in this link: