Hi Mawan,
I don't have yet a complete knowledge about the api of CppCms. But I use it
in very simple form. When you have a validation error in an element (aka: a
subclass of cppcms::widgets::base_widget), the state of this element become
invalid. This invalidity may occur in a manual validation overloading of
the validate() method, or automatic validation, when you use a method
like cppcms::widgets::base_widget::base_text.non_empty(), and the element
is submited blank.
In the view you can access the method cppcms::base_form.valid() of
cppcms::widgets::base_widget like that:
<% if not form.name.valid() %>
Message error here
<% end %>
I hope that could be useful for your doubt and sorry about my English.
Rodrigo Emygdio
2016-02-24 7:05 GMT-03:00 mawan sugiyanto <ma...@gm...>:
> Dear All
>
>
> if i get form validation false, what can i do to make sure where is the
> error type or which element has error?
>
> Thanks
>
>
> Mawan
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
>
|