Why not just stick with name value pairs? required:true,number:true

--
Brandon Aaron

On 11/13/06, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote:
> Hi jQueryians,
>
> just tried to use the metadata plugin for my validation plugin. 
> Unfortuanetely, it doesn't work out as nicely as I hoped.
>
> So far, I used this syntax to define validation rules with optional 
> parameters:
>
> validate="required,number,length:2:8"
> class="$v(required,min:5)"
>
> The only data that the metadata can read from this example is the "min:5". 
> Otherwise it's missing a colon plus whatever (required, number) or will 
> complain about the second colon (length:2:8).
>
> I'm trying to find an elegant solution for this.
>
> My first idea was to write a custom parser that starts working when the eval 
> call in the metadata plugin fails. I'd use the key as a value whenever the 
> value is ommited. Multiple parameters could be handled by converting them 
> into an array.
>
> The problem: This won't be very elegant.
>
> So it's up to you: Any ideas? John? Up for a challenge? :-)
>
> --
> Jörn Zaefferer
>
> http://bassistance.de
> --
> "Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de
> Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht!
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to