• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Password length

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, i've done a validator method to compare two passwords of registration.
I would to find a method to control the length too!
I've not successful to do this, i've sintax problems when i use more than 2 depends.

Below i report the pieces of code interested:

File: Validator.xml


File: Validator-rules.xml



The problem is that i don't know how to use more than 1 "depends" attribute, i don't know the correct sintx to pass variables to the attribute, i'm sure that the error is into "Validator.xml".
Anyone can help me?

Thanks a lot.
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you use minlength, you need to create a second variable in your xml. You also need to create another argument, so you can display the error message with the correct minlength value. I've set it up in the example so that it isn't using the resource properties file, but you can do it either way.

So if you wanted a min length of 4, you would do this...


Hope this helps!!

-Nate
 
Mike Floyd
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks a lot, now it works.
the problem was that i put the var name and var value target into
the same tag var of the other variable.
 
Nate Leech
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hehe, I only the knew the answer cause I had the exact same problem a couple weeks ago
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic