[web2py] Re: Form custom input errors
Yes. Ok adding this code it works: {{if form_new_event.errors.event_datetime:}} {{=form_new_event.errors.event_datetime}} {{pass}} If it's not necessary to custom the input this is better (in the manual): {{=form_new_event.custom.widget.event_datetime}} Il giorno lunedì 8 agosto 2016 22:45:28 UTC+2, Niphlod ha scritto: > doesn't form.errors[fieldname] store the error ? > > On Monday, August 8, 2016 at 9:51:53 PM UTC+2, Gael Princivalle wrote: >> >> Hello. >> >> Is it possible in a custom form to display the individual input errors >> like "Invalid email", if in the field of a table we have the validator >> IS_EMAIL ? >> >> Thanks. >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Form custom input errors
doesn't form.errors[fieldname] store the error ? On Monday, August 8, 2016 at 9:51:53 PM UTC+2, Gael Princivalle wrote: > > Hello. > > Is it possible in a custom form to display the individual input errors > like "Invalid email", if in the field of a table we have the validator > IS_EMAIL ? > > Thanks. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Form custom input errors
you can right a custom validator. For example. if form.process().accepted: email_you_entered = form.vars.email() and then run the IS_EMAIL on that variable. If true. you process further. False, you error and go back. On Monday, August 8, 2016 at 3:51:53 PM UTC-4, Gael Princivalle wrote: > > Hello. > > Is it possible in a custom form to display the individual input errors > like "Invalid email", if in the field of a table we have the validator > IS_EMAIL ? > > Thanks. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.