Documentation for Module: Validators.js ||  Module Index

Context Index
tjvalid Functions: ==>
OVERVIEW TYPE HANDLERS all one  

Context: tjvalid

Overview Of: tjvalidTopContext IndexNext Function
    General: Data-type based validation and serialization
    Datatypes: Data entered from an input field can be pseudo-typed via a
      parsed sub-element. A pseudo-type will be found parsed from the src
      or the title attribute. The key defaults as title and can be changed
      via the <control-key> variable.
      Controls: are parsed into pairs by , and each pair is parsed on :
      Example: title="type:uinteger,req:*,label:My Age" => {"type":"uinteger","req":"*","label","My Age"}
    Validator: type handlers. real types first.
      args: ele: references the element
            name: name of element
            form: parent form. For radio buttons and multiple checkboxes,
                  enables back referencing the entire group
            control: the value for src or title attributes.
              Contains the following control attributes:
                req: required (if multiple, how many)
                label: readable text to indentify element
                display: for hidden fields, ID of div tag for displaying text
Type Handlers Of: tjvalidTopContext IndexPrevious FunctionNext Function
    General: Type_Handlers Type handlers are called in the dispatch loop in the go function.
    If: a control parses to a psuedo-type any data entered at the associated input field is
      validated as per the specifications of the type.
    Pseudo-types:: date => mm/dd/yyyy, decimal => defaults currently to 2 degrees of precision,
      email,'excheckbox => Checkboxes that behave like radio buttons','integer' => Can be signed,
      money => decimal of 2 places $ is optional,'phone' => xxx-xxx-xxxx format,
      time => adjusts for Military and civilian time formats,'uinteger' => unsigned integer,
      url, year => exactly 4 digits, zipcode 9 (1111-22222 or 22222 format),
Function: obj.allTopContext IndexPrevious FunctionNext Function
    syntax: tjvalid.all(<theForm>,<button>,<boolean-display>,<boolean-trapErrs>)
    description: Launches validation/serialization process for entire form.
    Arg: theForm - If triggered by form onsubmit, context of form or null
    Arg: button - If triggered by button onsubmit or submit button, context of button or null
    Arg: display - If set execute the dbg() function.
    Arg: trapErrs - If set traps errors and displays error message.
    Returns: Serialized data if success, or false.
Function: obj.oneTopContext IndexPrevious Function
    syntax: tjvalid.one(<obj>,<bool-display>,<bool-trapErrs>) Validate and serialize one element