Choose your database:
MS SQL Server
SQL Anywhere

Subscribe to our news:
Rickey Steinke: "Folks, I wanted to drop a line and give you a fanatic thank you. I have a project due for my computer application course and without PHP Generator I never would have gotten it done with the professional results your product produced. My sincerest gratitude to each and every team member who brought this program to light".
David Lantz: "Thank you, this is by far the simplest, and most friendly utility for building db record system I have ever used. I wish I could get my systems guys at the office to purchase this for our company would be so very helpful and speed up a lot of work. I for one have used it for everything from a simple inventory record of my house, to a members record for my church just little pet projects and a test bed to test my own db builds and theories before having to hand code at the office..... it is a lot of fun to work with".


Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next


This event occurs before submitting an edit form. It allows you to detect errors on the client before the form is submitted to the server to avoid the round trip of information necessary for server-side validation. Live example.



function OnEditFormValidate (fieldValues, errorInfo)




An associative array of values containing user input. To access the value of the editor of the column_name column, use the field_values['column_name'] syntax.


The object that provides interface (the SetMessage method) to set a validation error message.


Example 1:

The code below demonstrates the verification of the percent number on the record inserting.


if (fieldValues['percents'] < 0 || fieldValues['percents'] > 100)


    errorInfo.SetMessage('Percent value should be between 0 and 100.'); 

    return false;



Example 2:

The following code is used in the NBA demo project to ensure that home and away teams are different for an inserted game:


if (fieldValues['home_team_id'] == fieldValues['away_team_id'])


  errorInfo.SetMessage('Home and away teams must be different');

  return false;



See also: OnInsertFormValidate

Prev Return to chapter overview Next