Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

problem in using mask validation

 
Rancher
Posts: 425
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

i'm trying to use mask validator in my application, but its not working.

alongwith mask, i'm using minlength and required validators and they're working fine. but, when these two conditions are satisfied, the application shows me errors related to mask validator (even if the condition for mask validator is satisfied)

I have this entry in my validation.xml:




This is the entry in validator-rules.xml:




and this is the entry in my ApplicationResources.properties file



"minlength" and "required" are working fine.... the problem is with mask validator...

any help would be greatly appreciated.


thanks,
Pushkar.
 
Pushkar Choudhary
Rancher
Posts: 425
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

i was able to get through the application successfully, but only when i removed the global constant "validationMask" (which i had declared in my validation.xml file) and replaced it with a regex for validation.

can anyone please take a look at the global constant declared in the code (validation.xml code provided in my previous post) and tell me what is wrong in the declaration..??

Thanks,
Pushkar.
 
Pushkar Choudhary
Rancher
Posts: 425
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
doesn't Merril or anyone else have any answer for this..???
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The definition of the global constant is fine. It's the reference to the global constant that's wrong. It should be:

${validationMask} -- with curly braces

rather than

$(validationMask) -- with parenthesis
 
Pushkar Choudhary
Rancher
Posts: 425
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oops.... silly mistake...!!!


anyways... it works fine now...

thanks a lot Merril...


Regards,
Pushkar.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic