posted 19 years ago
Ergin,
Thanks for the reply. What you said was correct, the var:minlen is wrong, I defined it as var:minlength and its working.
But I have another problem now: I wanted to implement my own custom minlength validation as follows:
So I named it as "var:minfldlength", it is validating properly. But it was always gives the output as
"Title Size can not be less than null characters"
I do not know and I have tried all my best still the "null" is not taking the value "3" or whatever is used. But if I enter more than 3 chars, it validates properly and does not show any error.
See the code:
It is able to identify {0} from the properties file but not {1}. I do not know why.
I also tried using
still does not work.
This is the validation-rules.xml
The version of dtd I am using is validator_1_1_3.dtd
The custom Code for MinFldLength is as follows:
I do not know where the catch no matter how many ever times I try it gives my the same error:
TITLE SZE can not be less than null characters
Praise the Lord, finally just now as I was writing to this forum, I got this idea and that solved my puzzle:
In the validation-rules: I forgot to put this attribute in "validator" node:
jsFunctionName="org.apache.commons.validator.javascript.validateMinLength"
Now I ran it and its working awesome.
Thanks for all the suggestions,
Lk.