#2424 closed bug (fixed)
[validate] custom rule dont work with maxlength property.
Reported by: | vinipitta | Owned by: | joern |
---|---|---|---|
Priority: | major | Milestone: | 1.2.3 |
Component: | plugin | Version: | 1.2.1 |
Keywords: | validate | Cc: | |
Blocked by: | Blocking: |
Description
PLUGIN: Validate VERSION: 1.2.1
A custom rule don't work if the maxlength property of the input field is defined. I created an example that illustrate the bug. There are two input text fields and both are validated by the same rule. The first have the maxlength property defined. The custom rule show a alert message with the field name. The first field will be checked only when there is some text in the field because in other way, the maxlength rule will return a dependecy-mismatch and the check method will abort the execution. The second field will be aways checked because it has not the maxlength property. This execution flow can be easy checked using the firebug plugin of Firefox to debug the js execution. See the check method starting in the 411 line when the rules for the element are retrieved.
Attachments (1)
Change History (6)
Changed 15 years ago by
comment:1 Changed 15 years ago by
Milestone: | 1.2.4 → 1.2.3 |
---|---|
Owner: | set to joern |
Version: | 1.2.3 → 1.2.1 |
comment:2 Changed 15 years ago by
I think this might be related to the bug I reported last week: http://dev.jquery.com/ticket/2473
If a field has multiple tests, and one of the tests returns "dependency-mismatch", it will stop further testing of this field and return without any value. I believe it should continue to do the other tests, and if none of them fail, it can return without any value. This is fixed in my patch.
comment:4 Changed 15 years ago by
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
I take that back. The issue described in #2473 is similar, but not the same.
Showcase of the bug.