Re: [Cppcms-users] Ajax based form validation
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-06-21 09:42:04
|
----- Original Message ----- > From: Christian Gmeiner <chr...@gm...> > To: cpp...@li... > Cc: > Sent: Friday, June 15, 2012 4:04 PM > Subject: [Cppcms-users] Ajax based form validation > > Hi all, > > currently I am looking into a way to integrate client side form validation into > a cppcms application. > I have looked around and found this nice jquery based one: > jQuery-Validation-Engine > https://github.com/posabsolute/jQuery-Validation-Engine > > The nice thing is that it provides a nice Ajax api - > https://github.com/posabsolute/jQuery-Validation-Engine#ajax-protocol > > Is there some way to reuse the defined validations (e.g. struct > login_form : public cppcms::form) with this api? > > thanks > --- > Christian Gmeiner, MSc Generally Ajax based validation is very limited as for example it can't change foreign keys and so on. The "real" power of cppcms form validation is in being able to overload validate() function. You can use some widgets data by for example calling <%= myform.my_widget.limits().first %> to get minimal limit or some other stuff. Generally there is no direct support of client side validation as it will always be limited. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ |