on 12-24-2008 5:12 AM
Hi All,
I have a field named percentage in the table. I have kept a validation on the field that the total of the column should be 100. The validation is happening properly and displaying the error message but the values are inserting in the backend table if the sum is less than or greater than 100. How can i controll this thing . Plesae Suggest Us.
Regards,
Suman
Hi,
As said above, you are passing the values to backend before validation or not using the validation result in insert records to back end.
simple solution is.... take a boolean type attribute make it false at first, if your validation is success then make /change it true and then pass the values to back end.
if(ture)
{
//insert records in backend.
}
else dont insert the record.
PradeeP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
resolved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the following document will help you..
Thanks and Regards
shanto aloor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is simple ....
i think you are inserting the values before validation....
please do the validation in the action which you are using to insert the values into backend ,and allow the backend insertion only if the validation is true
Thanks and Regards
shanto aloor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.