Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validation / Where to Put code / Where to call it?
Message
From
21/04/1999 09:51:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Validation / Where to Put code / Where to call it?
Miscellaneous
Thread ID:
00210514
Message ID:
00210514
Views:
57
Hi All...

I wanted to solicit some opinions of how you were doing the following.

I have written a validation class that reads validation rules from DBCX metadata, then it builds a query using this information and the value passed to determine if it is valid or not.

So, basically I pass the NewValue, Table, Field to oValid.IsValid and it returns true or false.

So... WHERE DO I CALL IT? I was thinking I should put the class definition in the SP of the database, then create a IsValid wrapper function that uses the class. Then, in the field rule of all the fields I can call this.

Well, that would be good when users were using VFP but when they are in the ap, it would mean waiting for a save to see if the data is valid.

The other thought is to call the validation from the Field Objects... the text boxes and such from the LostFocus (or valid). This would give the user instant feedback. But, if I did this, and still have the validation in the field rule, the code would run twice. I could do it only in the front end, but that would allow for no data integrity if not useing the ap.

So, what do you all think/do about this?

BOb
Next
Reply
Map
View

Click here to load this message in the networking platform