Package orm2 :: Module validators
[hide private]
[frames] | no frames]

Module validators

source code

This module defines classes for validating values stored in dbproperties before they screw up the database or cause a CONSTRAINT error.

Classes [hide private]
  validator
The default validator: It doesn't check anything.
  not_null_validator
For NOT NULL columns.
  not_none_validator
For NOT NULL columns.
  not_empty_validator
For columns which may not contain empty strings.
  length_validator
Check an argument value's length.
  range_validator
A generic validator for value ranges (fortunately Python doesn't care, it can be used for numerals, dates, strings...)
  re_validator
Regular expression validator.
  email_validator
Check if the value is a valid e-Mail Address using a regular expression.
  fqdn_validator
Check if the value is a valid fully qualified domain name.
  idna_fqdn_validator
Like fqdn_validator above, but for idna Domains (Unicode)
  idna_email_validator
Like email_validator above, but for idna Domains (Unicode)

Variables [hide private]
  domain_name_re = <_sre.SRE_Pattern object at 0x42c0e8>
  local_part_re = <_sre.SRE_Pattern object at 0x417638>
  email_re = <_sre.SRE_Pattern object at 0x210a20>

Variables Details [hide private]

domain_name_re

None
Value:
([0-9a-z]([0-9a-z-]*[0-9a-z])?\.)+[a-z]{2,4}                           
      

local_part_re

None
Value:
[-a-z0-9_\.]+                                                          
      

email_re

None
Value:
[-a-z0-9_\.]+@([0-9a-z]([0-9a-z-]*[0-9a-z])?\.)+[a-z]{2,4}