Documentation for Module: valid.py ||  Module Index

General: !Overview Manage data validation for server-side checking.
author: Tim Johnson tim@akwebsoft.com
Args: Data to validate and label to identify.
Returns: Calling code should accept a 2-member tuple with the last as
  an error message. A None message signals success

Global Index
date integer password time year
decimal is_leapyear phone uinteger zipcode
email money      

Global function documentation

Function: dateTopGlobals IndexNext
    syntax: valid.date(<d>,<label>) Validate a date for mm/dd/yyyy numeric format.
    Note: Allow any of several seperators: /, \, , ;, -, .
Function: decimalTopGlobals IndexBackNext
    syntax: valid.decimal(<Decimal-string>,<label>) Validate a string as a signed integer
    Compensates: for
      1: Misplaced or missing commas.
      2: possible use of a semi-colon or embedded spaces.
Function: emailTopGlobals IndexBackNext
    syntax: valid.email(<E>,<label>) Validate an email address.
Function: integerTopGlobals IndexBackNext
    syntax: valid.integer(<U>,<label>) Validate a string as a signed integer
    Compensates: for
      1: Misplaced or missing commas.
      2: possible use of a semi-colon or embedded spaces.
    Note: Strips any decimal.
Function: is_leapyearTopGlobals IndexBackNext
    syntax: valid.is_leapyear(<Y>) Is Y a leap year
Function: moneyTopGlobals IndexBackNext
    syntax: valid.money(<Decimal-string>,<label>) Validate a string as a signed integer
    Compensates: for
      1: Misplaced or missing commas.
      2: possible use of a semi-colon or embedded spaces.
Function: passwordTopGlobals IndexBackNext
    syntax: valid.password(<v>,<lable>,<max>,<min>)
    Description: Verify password with number of characters between max and min
    #Note no embedded spaces.
Function: phoneTopGlobals IndexBackNext
    syntax: valid.phone Validate text as a phone number. Remove any hyphens.
Function: timeTopGlobals IndexBackNext
    syntax: valid.time(<T>,<label>) Validate time format.
    Handle: military and standard am/pm some minor reformatting
Function: uintegerTopGlobals IndexBackNext
    syntax: valid.uinteger(<U>,<label>) Validate a string as an unsigned integer
    Compensates: for
      1: Misplaced or missing commas.
      2: possible use of a semi-colon or embedded spaces.
    Note: Strips any decimal.
Function: yearTopGlobals IndexBackNext
    syntax: valid.year(<Year-string>,<Label>) Validate an unsigned, 4-digit year
Function: zipcodeTopGlobals IndexBack
    syntax: valid.zipcode(<code>,<label>) Validate text as a 5-or-9-digit zip code.

Global function documentation