onvalidate check fields against database and exit

How can i use the onvalidate event to check the inputs on the form and, if they are not correct, cancel the insert into the database?

Regards and thanks in advance.

Erwin

In onValidate event in your form,
If ({your_field} == ‘wrong value’) {
sc_error_message(‘Please enter the right value’);
}

That will cancel the insert.