Powered by Vanilla 1.1.2.
Ilija has improved the client side error checker, check it out again at http://ilija.biz/projects/uniform/
Kenone take a look at the source code, this line for instance:
<input name="password" id="password" value="" size="35" maxlength="25" type="password" class="textInput required validate_minlength 3 validate_maxlength 5" />
Take a look at the class attribute, it's values are "textInput required validate_minlength 3 validate_maxlength 5" - the textInput one is used by UniForm, the rest of them are for JS validator - basically it says validate this field so there are minimum 3, but maximum 5 characters entered. It's really simple and logical.
That's a terrible abuse of the class attribute. The point of semantic XHTML and CSS is to separate the style from the content and to have the content marked up with meaningful tags. Along those same lines, the structure (XHTML) should also be separated from any programming, including JS, as much as possible.
The Javascript should use the maxlength field to determine max length. As for min length, use a meaningful class attribute like "password" to represent the password field and then define the length of password in the variable declarations at the top of the Jaavascript page. This has the dual purpose of abstracting the Javascript layer away from the XHTML and providing a semantic class name that can be used to provide specific styling (now or in the future).
Sorry, I'm new here and I don't mean to get on a soapbox -- I just wanted to offer some input. Please take it with a grain of salt as I know i can be a bit terse in my writing (I'm working on it...).
I do agree clussman, unfortunately until someone comes up with a better client-side validator we're stuck with this since I am completely JS illiterate.
I have so many notes and todos concerning Uni-Form piled up - I don't even know where to start any more since it has been on a back-burner for so long now. But it kind of has it's good side though - using it for all this time (that I spent not working on it) I have found quite a few shortcommings that I plan to improve on whenever that might be.
1 to 4 of 4