Guru Guru - 5 months ago 50
Javascript Question

How to validation check in Netsuite Suitelet Script

I created form using nlapiCreateForm and add some fields.

Clicking submit button I want to check validation but it entered post mode automatically.

Some fields need to be required field so that null value couldn't be inputed.

Anyone pls help me.


When you create your field, you can call .setMandatory()


var form = nlapiCreateForm('Test Form');
var field = form.addField('custpage_testfield','text','Test Field');