Validation not working

I have 2 signature blocks that I want to ensure they are signed. They reside in the 3rd step of a wizard. I can't get the validation to work. Below is the code I am using.

fd.field('DriverSign').validators.push({
name: 'SignValidation',
error: "Driver Must Sign",
validate: function() {
if (fd.field('DriverSign').value == null{
return true;
}
return false;
}
});

fd.field('InspectorSign').validators.push({
name: 'SignValidation',
error: "Inspector Must Sign",
validate: function() {
if (fd.field('InspectorSign').value == null{
return true;
}
return false;
}
});

Hello @IT.Joe,

There is a typo in your code, the missing bracket in the condition statement. I've updated the code, please try it out:

fd.field('DriverSign').validators.push({
name: 'SignValidation',
error: "Driver Must Sign",
validate: function() {
if (fd.field('DriverSign').value == null){
return true;
}
return false;
}
});

fd.field('InspectorSign').validators.push({
name: 'SignValidation',
error: "Inspector Must Sign",
validate: function() {
if (fd.field('InspectorSign').value == null){
return true;
}
return false;
}
});