Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL
Expertise: Beginner
May 29, 1997

Field-level and interfield validations

Question:
Field-level validations should be done when the user visits the field. How can this be done?

Interfield validations on the same screen also should be done when the user visits the latter field. Is this possible?

Answer:
The perfect method for validation is the aptly named Validate(), fired whenever a user changes a value in a field and leaves the field.

Regarding interfield validation, your description is slightly off base. In a graphical application, you have no way of controlling which field is 'last' to be visited. The way I would implement this is to declare a user-defined method and call the method from the Validate() method for all of the the fields that participate in the validation.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap