How does TValidate work?
TValidate works on any form by simply selecting the components and dropping it on the form that you would like to validate. There is no need to change a single line of code, and no special edit box or other components are needed to use TValidate.
Once you have identified the fields that have to be validated for user input, a simple double-click on the TValidate component opens up the Validation Editor.
By right-clicking on the Component List area, a menu appears with which you can either add or remove components to be validated. By clicking on "Add Component" a screen pops up, from which available components can be selected for validation. Double-click on the required component to add it to the list of components to be validated.
By selecting any of the components in the Validation Editor, their properties can be modified to accept the required input. By clicking on the "Advanced" button, the Property windows appears, from which the behaviour of the selected component can be controlled.
Depending on the selection in the Data Conversion group box, one or more of the other group boxes will appear. Easy of the group boxes allow you to control the behaviour of the type of input that you expect.
For instance, if you select Text in the Data Conversion group box the Text and Case Conversion group boxes will appear, and you can control the minimum length, and the mask of the edit box, as well as how the input text will be formatted once the validation procedure is called.
However, the functionality of TValidate allows for much more. You can also use logical expressions to determine the result of user input. This is done by building simple boolean statements which will be evaluated during validation. Expressions allow for classical if...then scenarios without any programming required.
For instance, if a form requires a user to supply either his first name or his surname, and this selection as to which will be supplied is done via two radio buttons, the following boolean statement can be used for validation. "(RadioButtonSurname and EditSurname) or (RadioButtonFirstName and EditFirstName)". If the radio button which requires a surname is selected the edit box for the surname must be filled in, and vice-versa, otherwise the validation will fail.