Aaron Heimlich schrieb:
> Jorn,
>
> Great stuff so far!
>
> I wonder, though, if it would be possible to have settings.rules and 
> settings.messages be organized by element name instead of element ID.
>
> If I'm trying export server-side validation rules to your plugin (as 
> JSON and then converted into your settings format by a small wrapper), 
> the server-side validation processor may not know what each element's 
> ID attribute is.
>
> I suppose, in my wrapper, I could take all of the element names and 
> find the appropriate IDs, but it seems like it would be easier if 
> settings.rules and settings.messages were organized by element name.
Thanks for bringing this up. I already though about it once or twice, 
and considering some other issues, it seems like I will drop IDs 
entirely. To avoid a serious performance lost, I just have to pass 
elements around instead of their IDs. And it shouldn't be too hard to 
emulate the label-for-input associations with jQuery. As I have to drop 
labels as error messages by default anyway, I need to implement that. It 
should be possible to mix both: If someone prefers to use labels as 
error messages and has assigned IDs to input, I can use that ID in the 
for attribue, otherwise I emulate the behaviour.

One more thing: I'd really like to take a look at your code that 
produces the validation rules from serverbased stuff. For one thing, I 
want to write a tutorial that takes you through the basics and details 
of using the validation plugin, and I'd like to include some information 
about a deeper serverside integration then the current demos provide. 
Personally I'm working with Java based JSF, and its not trivial to 
generate the rules I'd need from JSF's validation rules. Being able to 
show how one approach would work should give enough ideas to solve in 
other enviroments or languages, too.

I hope you can share something, be it on this list or private.

-- 
Jörn Zaefferer

http://bassistance.de


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to