Hello there
Is it possible to use a Javascript function to validate a field, rather than use the “Validation Pattern” approach? I am OK to write the function, however I also want to be able to use it with the Form Level Validation Settings (having the function run again when the form submits etc.).
I have seen references to the “Run custom validation script” option on a Validate tab, however I don’t see these.
I am using LiveCycle Designer 9.
Many thanks
Geoff Olding
Views
Replies
Total Likes
Yes you can use your own code on the Validate event …simply return a true or false value and the script error message will fire appropriately
Paul
Views
Replies
Total Likes
Thanks for the reply, however this doesn't work.
I am returning true (or false) from the Validate event, and have set the Validation Script Message appropriately.
After entering a value in the field, nothing happens.
Regards
Geoff Olding
Views
Replies
Total Likes
Tried it here and it worked fine. Here is my code on the Validate event of the field I wanted to test:
if (this.rawValue == "1111"){
true
} else {
false
}
If the user enters 1111 in the field then true is rturned and nothing will happen and the tab will put thecursor in the next field. If they eneter anything else then false is returned and the Validate script error message is displayed.
Paul
Views
Replies
Total Likes
I now have this working.
You can use the following line of code in the validate event:
event.rc = false
Thanks for your help (I assumed you meant that the function should return true or false).
Thanks for your help.
Views
Replies
Total Likes
Hello again
It would probably be sensible to document this properly in the LiveCycle documentation.
Views
Replies
Total Likes
Views
Likes
Replies