General information
Category:
The Mere Mortals .NET Framework
Hi Tim,
Basically our web app was developed in .Net environment with MM and we have some VFP COMs to handle so simple validation. But due to many different requirements from our clients. We need flexibility in the data validation component meaning we can change the business rules depending on client requirements.
Eg.
1. Client A may want a certain field to be mandatory based on a certain condition whereas client B may want the same field to be mandatory at all times and client C may want the field to be optional.
2. Client A may want a certain field to be a certain set of values based on another field value.
Because of these requirements, the validation rules must be data driven that can be changed without changing the application code.
Validation will be executed based on rules defined in a MSSQL table.
The rules table maybe something like this:
BO Rule Expression Error Message
BO1 TxnCode =”ABC” AND EMPTY(Reason) Reason must be filled for Txn Code, ABC!
BO1 TxnDate less than Submit_Date + 7 Txn Date must be at least 7 days after submit date
We are not sure if above is easily achieved using .NET code.
But we have a few senior VFP developers who know VFP has powerful commands such as EXECSCRIPT and EVALUATE that allows for execution of code that is only known (retrieved from rules table) at runtime.
We are therefore looking into having .NET passing a record object or XML string of a record data to a VFP COM which will then read a rules table and execute the validation specified in the rules table.
Thanks.
Previous
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