I agree, "Please input a number between %(min)s and %(max)s" is an improvement over the current default.
On Oct 20, 4:38 pm, Iceberg <[email protected]> wrote: > > On Oct 19, 11:00 pm, Richard <[email protected]> wrote: > > > > hello, > > > > I find the validator error "too small or too large" too general. > > > Ideally they should return "not a number" if the int/float cast fails, > > > or "too big" / "too small" when out of range. > > > > Would this work with the current API, or does each validator need to > > > have a single error message? > > > > Richard > > On Oct20, 12:53pm, mdipierro <[email protected]> wrote: > > > True but than one would need to pass two error messages. You can pipe > > two validators > > > [IS_MATCH('\-?\d+',error_message='not a number'),IS_INT_IN_RANGE > > (0,100)] > > So, to avoid the complexity of piping two validators, I still think > only one error messasge "Please input a number between %(min)s and % > (max)s" really fits all, from logical point of view. Yet from i18n > point of view, I hope the error_message is easier customizable. Please > refer to my old post > here.http://groups.google.com/group/web2py/msg/a760d3cfe03196c1 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

