On Fri, Feb 5, 2016 at 2:15 PM, Michal Petrucha <
michal.petru...@konk.org> wrote:
> On Fri, Feb 05, 2016 at 08:24:46AM -0500, Alex Hall wrote:
> > Hi all,
> > What's the recommended way to restrict input? For instance, I store a
> > phone number as an integer, and I need it to have 7, 10, or
For validation, I use FormEncode, which is super old.
Just to chime in on the above:
1. Phone Numbers should be strings. They can have a leading 0. Then you
have to worry about extensions, etc.
2. Most people I know will do validation on a form, that is used to
populate the sqlalchemy model
On Fri, Feb 05, 2016 at 08:24:46AM -0500, Alex Hall wrote:
> Hi all,
> What's the recommended way to restrict input? For instance, I store a
> phone number as an integer, and I need it to have 7, 10, or 11 digits.
> In its getter, I format it so it looks good as a string, and in its
> setter, I
Hi all,
What's the recommended way to restrict input? For instance, I store a
phone number as an integer, and I need it to have 7, 10, or 11 digits.
In its getter, I format it so it looks good as a string, and in its
setter, I take the string the user inputs, strip only the integers,
and store