[Bese-devel] Re: validators and null values
Marco Baringer
mb at bese.it
Fri Apr 28 10:55:55 UTC 2006
"Nathan Bird" <nathan at acceleration.net> writes:
> Number-range-validator should inherit from is-a-number validator, it doesn't
> make sense to check if a string is inside a number range, and so we've got
> to do the work of ensuring it is a number first anyways. Previously this was
> being handled kindof by parse-integer (would return nil or any integer found
> in the string), and would break for number range validator (I expanded the
> examples/forms.lisp in order to show this)
>
> Is-an-integer-validator previously allowed 11.3 without giving any error and
> returned value 11. It now fails the is-an-integer validate.
nice. applied everything.
> Things I came across but didn't change:
>
> (value number-field): if the client didn't enter anything in, shouldn't we
> return nil and not 0?
yes.
> I don't think there is a need for the integer-range-validator anymore.
> Number-range-validator takes care of it, and if you are using the
> integer-field you already have the is-an-integer-validator attached.
agreed.
> Adding a 'required' initarg (that is itself optional :-) to form-field to
> automatically attach the required validator to anything. This is such a
> common case we probably want to make it easier.
agreed.
> The javascript validation is still untested, but was broken previously do to
> an id mismatch (at least on the examples page). I will try to look into this
> further somewhere in the near future.
>
>
> Buy now (from ucw_public) and you ALSO GET!
> * a second patch where I rearrange the file a bit to try to reduce the
> number of style-warnings due to undeclared functions.
> * more documentation
much abliged.
> * Russ' regex validator, an improved email validator, and a phone-number
> validator based upon it.
nice. are we sure cl-ppcre and javascript have the same syntax for
regexps?
--
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen
More information about the bese-devel
mailing list