Reputation: 19
I have a validation on a field (ACC) that is has to be 'like' another field (NUM) before being submitted. The validation works and populates an error when the fields are not similar, but if user corrects the issues by changing the value of the field and submits by hitting 'enter' it holds the old value, prior to the update in the DB. Is there a way to clear the values once the validation fails?
Upvotes: 0
Views: 556
Reputation: 142705
and submits by hitting 'enter'
If you really set item's property to perform submit when you press ENTER, then item's value is put into session state and validation will use the new value, not the old one.
Otherwise, yes - it'll use the old value (as it's the only one it sees).
Also, did you set validation's "Always execute" property to ON?
Upvotes: 2