One possibility to bypass the "SetLengthRange" method would be to use
MinLength and MaxLength (as in one of the samples for the
jQuery.Validation plugin). Or is there a pitfall with this approach.

   <input id="field1" name="field1" minlength="2" size="20" .../>

would require the content of the field1 to be between 2 and 20
characters long...

On Aug 25, 5:54 pm, gabriel <[EMAIL PROTECTED]> wrote:
> when debugging the 'JQueryValidator' class in Monorail I found that
> the validation method 'SetLengthRange' is not implemented correctly.
> This method defines a rule for the jQuery.Validation plugin.
> Unfortunately the plugin expects the 'name' of the element to
> validated as key where as the implementation takes the 'id' as key.
> But these are (most of the time) different.
> Example: I put an object of type Employee into the property bag
>    PropertyBag["employee"]=employee;
>
> then I have e.g. this field in my view (Brail View engine)
>   ${Form.TextField("employee.LastName")}
>
> The FormHelper class makes something like this of it:
>   <input id="employee_LastName" name="employee.LastName" .../>
>
> note that the id and name are different!
>
> Since the method "SetLengthRange" only receives as a parameter the
> content of the id attribute and NOT the html element it is not easily
> possible to resolve this problem...
>
> Any solutions for this???
>
> Any help is appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to