Module Expr Str FunctionDef arguments args NameParam defaults body Expr Str For TupleStore NameStore NameStore Call NameLoad NameLoad body If CompareEq NameLoad Str body Assign NameStore Str If Call NameLoad NameLoad NameLoad body Expr Yield BinOpMod Str TupleLoad NameLoad Call AttributeLoad Call NameLoad NameLoad attr orelse If CompareEq NameLoad Str body Expr Yield BinOpMod Str TupleLoad NameLoad NameLoad orelse Expr Yield BinOpMod Str TupleLoad NameLoad NameLoad decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam defaults vararg kwarg body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str Call AttributeLoad Str attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr body Return If Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad body Return Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num orelse If Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad body Return Call AttributeLoad Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Return SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list FunctionDef arguments args NameParam defaults body If Call NameLoad AttributeLoad NameLoad attr body Return BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam defaults kwarg body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr ListLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad Call AttributeLoad Str attr Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Assign NameStore BinOpAdd TupleLoad AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareGt Call NameLoad AttributeLoad NameLoad attr Num body Return Call AttributeLoad Str attr AttributeLoad NameLoad attr Return Str decorator_list decorator_list
N/A N/A 
Python Wrapper for Live Validation JavaScript

Generates javascript using template tags to comply with the LiveValidation library.
When used in combination, any form instance can be turned into javascript code that
validates the form fields before posting the form. This reduces server load by cutting
down on requests containing invalid fields (eg email=IAmSoNotAnEmail) and
improves user experience with live feedback and reduces human error.
 inner N/A N/A items N/A N/A N/A 
    Sorted items to display as compatable js objects (eg bool,regex)
     N/A N/A k v N/A sorted items N/A N/A N/A k is_ N/A N/A k is N/A N/A isinstance v bool N/A N/A N/A N/A %s: %s N/A k N/A N/A N/A repr v lower N/A N/A N/A k pattern N/A N/A N/A N/A %s: new RegExp(/%s/) N/A k v N/A N/A N/A N/A %s: %r N/A k v N/A Meta N/A N/A N/A 
    Abstract meta class for formatting the javascript commands
     __init__ N/A N/A self N/A a kw N/A N/A N/A self a a N/A N/A self kw kw N/A format_kw N/A N/A self N/A N/A N/A N/A { %s } N/A N/A ,  join N/A inner N/A N/A N/A self kw items N/A format_a N/A N/A self N/A N/A N/A N/A N/A len N/A self a N/A N/A N/A N/A isinstance N/A N/A self a N/A 0 basestring N/A N/A N/A repr N/A N/A self a N/A 0 N/A N/A N/A isinstance N/A N/A self a N/A 0 bool N/A N/A N/A N/A N/A repr N/A N/A self a N/A 0 lower N/A N/A N/A self a N/A 0 N/A __str__ N/A N/A self N/A N/A N/A N/A len N/A self a N/A N/A N/A Validate.%s( %s, %s) N/A N/A N/A self __class__ __name__ N/A N/A self format_a N/A N/A self format_kw N/A N/A Validate.%s, %s N/A N/A N/A self __class__ __name__ N/A N/A self format_kw N/A N/A Presence N/A Meta N/A N/A Validates that a value is present (ie. not null, undefined, or an empty string)
    
    args:
        - value - {mixed} - value to be checked
    
    kwargs:
        - failureMessage (optional) - {String} - message to be used upon validation failure (DEFAULT: "Can't be empty!")
        
        >>> print Presence('hello world', failureMessage='Supply a value!')
        Validate.Presence( 'hello world', { failureMessage: 'Supply a value!' })
     N/A Format N/A Meta N/A N/A Validates a value against a regular expression
    
    args:
        - value - {mixed} - value to be checked

    kwargs:
        - failureMessage (optional) - {String} - message to be used upon validation failure (DEFAULT: "Not valid!")
        - pattern - {RegExp} - regular expression to validate against (DEFAULT: /./i)
        - negate - {Boolean} - if true will be valid if the value DOES NOT match the regular expression (DEFAULT: false)
        
        >>> # check that 'validation' exists in the string, case insensitive...
        >>> print Format('live validation', pattern = r'^validation$', failureMessage = 'Failed!' )
        Validate.Format( 'live validation', { failureMessage: 'Failed!', pattern: new RegExp(/^validation$/) })
     N/A Numericality N/A Meta N/A N/A Validates that the value is numeric and: is an integer, is a specific number,
    is more than a minimum number, less than a maximum number, is within a range of numbers, or a combination of these
    
    args:
        - value - {mixed} - value to be checked

    kwargs:
        - notANumberMessage (optional) - {String} - message to be used when validation fails because value is not a number (DEFAULT: "Must be a number!")
        - notAnIntegerMessage (optional) - {String} - message to be used when validation fails because value is not an integer (DEFAULT: "Must be an integer!")
        - wrongNumberMessage (optional) - {String} - message to be used when validation fails when 'is_' param is used (DEFAULT: "Must be {is}!")
        - tooLowMessage (optional) - {String} - message to be used when validation fails when 'minimum' param is used (DEFAULT: "Must not be less than {minimum}!")
        - tooHighMessage (optional) - {String} - message to be used when validation fails when 'maximum' param is used (DEFAULT: "Must not be more than {maximum}!")
        - is_ (optional) - {mixed} - the value must be equal to this numeric value
        - minimum (optional) - {mixed} - the minimum numeric allowed
        - maximum (optional) - {mixed} - the maximum numeric allowed
        - onlyInteger (optional) - {Boolean} - if true will only allow integers to be valid (DEFAULT: false)
    
        >>> # check that value is an integer between -5 and 2000 exists in the string, case insensitive...
        >>> print Numericality( 2000.0, minimum= -5, maximum= 2000)
        Validate.Numericality( 2000.0, { maximum: 2000, minimum: -5 })
     N/A Length N/A Meta N/A N/A Validates the length of a value is a particular length,
    is more than a minimum, less than a maximum, or between a range of lengths
    
    args:
        - value - {mixed} - value to be checked
    
    kwargs:
        - wrongLengthMessage (optional) - {String} - message to be used when validation fails when 'is_' param is used (DEFAULT: "Must be {is_} characters long!")
        - tooShortMessage (optional) - {String} - message to be used when validation fails when 'minimum' param is used (DEFAULT: "Must not be less than {minimum} characters long!")
        - tooLongMessage (optional) - {String} - message to be used when validation fails when 'maximum' param is used (DEFAULT: "Must not be more than {maximum} characters long!")
        - is_ (optional) - {mixed} - the value must be this length
        - minimum (optional) - {mixed} - the minimum length allowed
        - maximum (optional) - {mixed} - the maximum length allowed
        
        >>> # check that value is between 3 and 255 characters long...
        >>> print Length( 'cow', minimum=3, maximum=255  )
        Validate.Length( 'cow', { maximum: 255, minimum: 3 })
     N/A Inclusion N/A Meta N/A N/A Validates that a value falls within a given set of values
    
    args:
        - value - {mixed} - value to be checked
    
    kwargs:
        - failureMessage (optional) - {String} - message to be used upon validation failure (DEFAULT: "Must be included in the list!")
        - within - {Array} - an array of values that the value should fall in (DEFAULT: Empty array)
        - allowNull (optional) - {Boolean} - if true, and a null value is passed in, validates as true (DEFAULT: false)
        - partialMatch (optional) - {Boolean}- if true, will not only validate against the whole value to check, but also if it is a substring of the value (DEFAULT: false)
        - caseSensitive (optional) - {Boolean} - if false will compare strings case insensitively(DEFAULT: true)
        
        >>> print Inclusion( 'cat', within = [ 'cow', 277, 'catdog' ], allowNull = True, partialMatch = True, caseSensitive= False)
        Validate.Inclusion( 'cat', { allowNull: true, caseSensitive: false, partialMatch: true, within: ['cow', 277, 'catdog'] })
     N/A Exclusion N/A Meta N/A N/A Validates that a value does not fall within a given set of values
    
    args:
        - value - {mixed} - value to be checked
    
    kwargs:  
        - failureMessage (optional) - {String} - message to be used upon validation failure (DEFAULT: "Must not be included in the list!")
        - within - {Array} - an array of values that the given value should not fall in (DEFAULT: Empty array)
        - allowNull (optional) - {Boolean} - if true, and a null value is passed in, validates as true (DEFAULT: false)
        - partialMatch (optional) - {Boolean} - if true, will not only validate against the whole value to check, but also if it is a substring of the value (DEFAULT: false)
        - caseSensitive (optional) - {Boolean} - if false will compare strings case insensitively(DEFAULT: true)
        
        >>> print Exclusion( 'pig', within = [ 'cow', 277, 'catdog' ], allowNull = True, partialMatch = True, caseSensitive= False)
        Validate.Exclusion( 'pig', { allowNull: true, caseSensitive: false, partialMatch: true, within: ['cow', 277, 'catdog'] })
     N/A Acceptance N/A Meta N/A N/A Validates that a value equates to true (for use primarily in detemining if a checkbox has been checked)
    
    args:
        - value - {mixed} - value to be checked
    
    kwargs:
        - failureMessage (optional) - {String} - message to be used upon validation failure (DEFAULT: "Must be accepted!")
        
        >>> print Acceptance( True, failureMessage="You must be true!" )
        Validate.Acceptance( true, { failureMessage: 'You must be true!' })
     N/A Confirmation N/A Meta N/A N/A Validates that a value matches that of a given form field
    
    args:
        - value - {mixed} - value to be checked
    
    kwargs:
        - failureMessage (optional) - {String} - message to be used upon validation failure (DEFAULT: "Does not match!")
        - match -{mixed} - a reference to, or string id of the field that this should match

        >>> print Confirmation( 'open sesame', match = 'myPasswordField', failureMessage= "Your passwords don't match!" )
        Validate.Confirmation( 'open sesame', { failureMessage: "Your passwords don't match!", match: 'myPasswordField' })
     N/A Email N/A Meta N/A N/A Validates a value is a valid email address
    
    args:
        - value - {mixed} - value to be checked
    
    kwargs:
        - failureMessage (optional) - {String} - message to be used upon validation failure (DEFAULT: "Must be a valid email address!")
    
        >>> print Email( 'live@validation.com', failureMessage= "I am an overridden message!" )
        Validate.Email( 'live@validation.com', { failureMessage: 'I am an overridden message!' })
     N/A Custom N/A Meta N/A N/A Validates a value against a custom function that returns true when valid or false when not valid.
    You can use this to easily wrap any special validations that are not covered by the core ones,
    in a way that the LiveValidation class can use to give the feedback, without having to worry about the details.
    
    args:
        - value - {mixed} - value to be checked
    
    kwargs:
        - against - {Function} - a function that will take the value and an object of arguments and return true or false(DEFAULT: function( value, args ){ return true; } )
        - args - {Object} - an object of named arguments that will be passed to the custom function so are accessible through this object (DEFAULT: Empty object)
        - failureMessage (optional) - {String} - message to be used upon validation failure (DEFAULT: "Not valid!")
        
    #>>> # Pass a function that checks if a number is divisible by one that you pass it in args object
    #>>> # In this case, 5 is passed, so should return true and validation will pass
    #>>> Custom( 55, against="function(value,args){ return !(value % args.divisibleBy) }", args= "{divisibleBy: 5}" )
    #... "Validate.Custom( 55, { against: function(value,args){ return !(value % args.divisibleBy) }, args: {divisibleBy: 5} } );"
     N/A now N/A Meta N/A N/A Validates a passed in value using the passed in validation function,
    and handles the validation error for you so it gives a nice true or false reply
    
    args:
        - validationFunction - {Function} - reference to the validation function to be used (ie Validate.Presence )
        - value - {mixed} - value to be checked
    
    kwargs:
        - Parameters to be used for the validation (optional depends upon the validation function)
    
        >>> print now( Numericality, '2007', is_= 2007 )
        Validate.now( Numericality, '2007', { is: 2007 })
     format_a N/A N/A self N/A N/A N/A N/A %s, %r N/A N/A N/A N/A self a N/A 0 __name__ N/A N/A self a N/A 1 N/A N/A LiveValidation N/A N/A N/A The LiveValidation class sets up a text, checkbox, file, or password input,
    or a textarea to allow its value to be validated in real-time based upon the validations you assign to it.
 
    args:
        - element - {String} - the string id of the element to validate
 
    kwargs:
        - validMessage (optional) - {String} - message to be used upon successful validation (DEFAULT: "Thankyou!")
        - onValid (optional) - {Function} - function to execute when field passes validation (DEFAULT: function(){ this.insertMessage( this.createMessageSpan() ); this.addFieldClass(); } )
        - onInvalid (optional) - {Function} - function to execute when field fails validation (DEFAULT: function(){ this.insertMessage( this.createMessageSpan() ); this.addFieldClass(); })
        - insertAfterWhatNode (optional) - {mixed} - reference or id of node to have the message inserted after (DEFAULT: the field that is being validated)
        - onlyOnBlur (optional) - {Boolean} - whether you want it to validate as you type or only on blur (DEFAULT: false)
        - wait (optional) - {Integer} - the time you want it to pause from the last keystroke before it validates (milliseconds) (DEFAULT: 0)
        - onlyOnSubmit (optional) - {Boolean} - if it is part of a form, whether you want it to validate it only when the form is submitted (DEFAULT: false)
    
        >>> usern = LiveValidation('id_username', wait=10)
        >>> usern.add(Format, pattern= r'/^hello$/i') #doctest: +ELLIPSIS
        <livevalidation.validator.LiveValidation instance at...
        >>> usern.disable() #doctest: +ELLIPSIS
        <livevalidation.validator.LiveValidation instance at...
        >>> usern.enable() #doctest: +ELLIPSIS
        <livevalidation.validator.LiveValidation instance at...
        >>> usern.remove(Format, minimum= r'/^woohoo+$/') #doctest: +ELLIPSIS
        <livevalidation.validator.LiveValidation instance at...
         __init__ N/A N/A self element N/A kw N/A N/A N/A self element N/A N/A element replace - _ N/A N/A self commands N/A N/A var LV%s =  new LiveValidation('%s', { %s }); N/A N/A self element element N/A N/A , join N/A inner N/A N/A kw items N/A add N/A N/A self validator N/A kw N/A N/A 
        Validates a passed in value using the passed in validation function,
        and handles the validation error for you so it gives a nice true or false reply.
         N/A N/A N/A self _format add N/A validator kw N/A self N/A extend N/A N/A self item N/A N/A N/A i item N/A N/A N/A N/A self add N/A i N/A 0 N/A i N/A 1 N/A remove N/A N/A self validator N/A kw N/A N/A 
        Removes a specific validation from the stack of validations that have been added
        
        Note - you must pass it EXACTLY the same arguments as you used to add the validation
         N/A N/A N/A self _format remove N/A validator kw N/A self N/A enable N/A N/A self N/A N/A N/A 
        A helper to enable a disabled field.

        Will cause validations to be performed on the field again, after having been previously disabled.
         N/A N/A N/A self _format enable N/A self N/A disable N/A N/A self N/A N/A N/A 
        A helper to disable a field, so that validations are not run on it,
        and its value will not be posted if part of a form.
        It will also remove any previous validation message and field class.
         N/A N/A N/A self _format disable N/A self N/A destroy N/A N/A self N/A N/A N/A 
        Will unregister all events of the LiveValidation object (preserving
        previously defined events) and remove it from any LiveValidationForm it might belong to.

        This is useful if you don't want a field to be a LiveValidation field any longer,
        or need to redefine a field as a new LiveValidation object with different parameters.
         N/A N/A N/A self _format destroy N/A self N/A _format N/A N/A self N/A a N/A N/A a N/A N/A N/A self element a N/A N/A N/A N/A self commands append N/A LV%s.%s(%s); a N/A __str__ N/A N/A self N/A N/A N/A N/A N/A len N/A self commands 1 N/A N/A N/A N/A join N/A self commands N/A N/A N/A