General information
Category:
The Mere Mortals Framework
Title:
Validation / Where to Put code / Where to call it?
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only