Package timedrive :: Package utils :: Module validate :: Class Validate
[frames] | no frames]

Class Validate


Validate this class is used to validate variables.

Instance Methods
 
__init__(self)
Initialization function for Validate
Boolean
check(self, check, value)
Used to delegate what check is needed.
Boolean
validate_filename(self, f)
Validate value as filename
Boolean
validate_folder_exists(self, f)
Validate value, as folder to see if exists on disk
Boolean
validate_foldername(self, f)
Validate value, as foldername
 
contains_invalid_chars(self, s, t)
checks if a string for a given types doesn't has invalid chars

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  FILE = 1
  FOLDER = 2
  STRING = 3
  INT = 4
  IP_ADDR = 5
  HOSTNAME = 6
  REGEX = 7
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 

Initialization function for Validate

Overrides: object.__init__

check(self, check, value)

 

Used to delegate what check is needed.

Parameters:
  • check (predefined variables)
  • value (String)
Returns: Boolean