OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Member Function Valid

Member function Valid is called by the associated edit-control object to verify that the data entered is valid.

Much like the TEdit::CanClose methods of interface objects, Valid is a Boolean function that returns true only if the string passed to it is valid data. One responsibility of an edit control's CanClose method is to call the validator object's Valid method, passing the edit control's current text.

When using validators with edit controls, you usually do not need to call or override the validator's Valid method; the inherited version of Valid will suffice. By default, Valid returns true if the method IsValid returns true; otherwise, it calls Error to notify the user of the error, and then it returns false.

See Also