validateRequiredFields function on model object

There is a function available on the skuid model object, called “validateRequiredFields”, but I couldn’t find any documentation on it. What does it do?

Hey Moshe -

The model version of validateRequiredFields will iterate all of its registered lists and call validateRequiredFields on each list.  In short, doing the same thing described near the bottom of this page ( but for each list, instead of just a single list.

The list version of validateRequiredFields will iterate fields that are rendered and if that field is required, will ensure that it has a value.  The return value of this function is a list of messages containing any errors.  If there are items in the array returned, you can call handleMessages on an editor (e.g. pagetitle, wizard step, etc.) to display them.

Hope this helps!

Documentation for Model.prototype.validateRequiredFields( ) has been added. In a nutshell, what Barry said is correct :slight_smile: