Thread: [Cppcms-users] Reporting validation failure reasons back to users
Brought to you by:
artyom-beilis
From: doug l. <bi...@gm...> - 2012-04-11 22:02:23
|
Hi -- I was just wondering if there's a mechanism for reporting detailed form validation failure reasons back to the user? I've been digging around in the tutorials and API docs & haven't found one. The tutorial on forms shows how to set up validation on a form, but that form just redisplays if the validation fails. In RoR, validation also adds errors to a collection whenever a validation constraint fails. Is there something like this in cppcms, or is this something the framework user should implement themself? If so, is there a recommended way of reporting validation errors back to the user? Thanks, Doug. |
From: <ele...@ex...> - 2012-04-12 11:32:12
|
Checkout http://cppcms.com/cppcms_ref/latest/classcppcms_1_1widgets_1_1base__widget.html#af18b8ac8a1bf73da6818a3d5449e5987 > Hi -- I was just wondering if there's a mechanism for reporting detailed > form validation failure reasons back to the user? > I've been digging around in the tutorials and API docs & haven't found > one. > The tutorial on forms shows how to set up validation on a form, but that > form just redisplays if the validation fails. > In RoR, validation also adds errors to a collection whenever a validation > constraint fails. > Is there something like this in cppcms, or is this something the framework > user should implement themself? > If so, is there a recommended way of reporting validation errors back to > the user? > Thanks, > Doug. > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev_______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: doug l. <bi...@gm...> - 2012-04-12 11:56:40
|
Ah, brilliant, cheers! So are those ever set automagically by constraints set on widgets (like range()), or does the developer set those? & thanks very much for your help. On 12 April 2012 12:32, <ele...@ex...> wrote: > Checkout > > > http://cppcms.com/cppcms_ref/latest/classcppcms_1_1widgets_1_1base__widget.html#af18b8ac8a1bf73da6818a3d5449e5987 > > > Hi -- I was just wondering if there's a mechanism for reporting detailed > > form validation failure reasons back to the user? > > I've been digging around in the tutorials and API docs & haven't found > > one. > > The tutorial on forms shows how to set up validation on a form, but that > > form just redisplays if the validation fails. > > In RoR, validation also adds errors to a collection whenever a validation > > constraint fails. > > Is there something like this in cppcms, or is this something the > framework > > user should implement themself? > > If so, is there a recommended way of reporting validation errors back to > > the user? > > Thanks, > > Doug. > > > ------------------------------------------------------------------------------ > > Better than sec? Nothing is better than sec when it comes to > > monitoring Big Data applications. Try Boundary one-second > > resolution app monitoring today. Free. > > > http://p.sf.net/sfu/Boundary-dev2dev_______________________________________________ > > Cppcms-users mailing list > > Cpp...@li... > > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: <ele...@ex...> - 2012-04-12 12:27:28
|
No, you must set it your self. So when you have range(5,10), you set your error_message to something like "Minimum 5, Maximum 10". If you want to automate it, you have to write it your self. That should be pretty easy though > Ah, brilliant, cheers! > So are those ever set automagically by constraints set on widgets (like > range()), or does the developer set those? > & thanks very much for your help. > > On 12 April 2012 12:32, <ele...@ex...> wrote: > |
From: doug l. <bi...@gm...> - 2012-04-12 14:06:20
|
That's excellent, thanks again, very much. On 12 April 2012 13:27, <ele...@ex...> wrote: > No, you must set it your self. So when you have range(5,10), you set your > error_message to something like "Minimum 5, Maximum 10". If you want to > automate it, you have to write it your self. That should be pretty easy > though > > > Ah, brilliant, cheers! > > So are those ever set automagically by constraints set on widgets (like > > range()), or does the developer set those? > > & thanks very much for your help. > > > > On 12 April 2012 12:32, <ele...@ex...> wrote: > > > > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |