Again, I'd be very happy if Aiki can insert the classes like 'required' or
'url' or 'email' or minlength='18' into the form inputs.

I don't expect Aiki to generate JavaScript for me. In fact, I don't want
Aiki to write JavaScript for me.

I would be very very happy though if Aiki does *server* side validation.
That means, if Aiki looks at whether a form input has 'required' or 'url'
and then enforces that when the form is submitted. That means, if a form
input with name="value" is marked 'required' in the Aiki form, then Aiki
should reject the form if the POST[value] is empty.

This means, let Aiki handle the form generation and validation on the
*server* side.

But let me handle form validation on the client side. Even if I turn off
JavaScript, I still want Aiki to validate forms.

Does that make sense?

Christopher

On Sun, Mar 25, 2012 at 4:44 PM, Roger Martín <[email protected]> wrote:

> Hi Christopher!
>
> Aiki must generate the necessary js for validation. With your JavaScript
> library it is easy:
> - in  aiki, a control is defined as  {"name": "user_name",
> validation:'required' } and aiki only must generate <input
> name='user_name'  class='validate'..
>
> That it's possible if we use the 'syntax' of javascript library. For
> example:
> { "name": "age", "validation": "required,min=18"  ) (*)
> If we use another syntax like validation="!is_empty(_SELF) and _SELF>18",
> we must 'translate' this type of expression to javascript library syntax.
>
> Conclusion: we will use the javascript syntax.
>
> roger
>
> (*) what class need these controls? or is it necessary make rules?
>
>


-- 
———
christopher adams
86 186 1172 0021 | 1 646 201 3335
49 15 156 219931 | 886 953 036 630
chris.raysend.com
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help   : https://help.launchpad.net/ListHelp

Reply via email to