Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Private Attributes
ATContentTypes.lib.validators.TALValidator Class Reference

List of all members.

Public Member Functions

def __init__
def __call__

Public Attributes

 name
 title
 description

Static Private Attributes

 __implements__ = IValidator

Detailed Description

Validates a text to be valid TAL code

Definition at line 74 of file validators.py.


Constructor & Destructor Documentation

def ATContentTypes.lib.validators.TALValidator.__init__ (   self,
  name,
  title = '',
  description = '' 
)

Definition at line 80 of file validators.py.

00080 
00081     def __init__(self, name, title='', description=''):
00082         self.name = name
00083         self.title = title or name
00084         self.description = description


Member Function Documentation

def ATContentTypes.lib.validators.TALValidator.__call__ (   self,
  value,
  args,
  kw 
)

Definition at line 85 of file validators.py.

00085 
00086     def __call__(self, value, *args, **kw):
00087         gen = TALGenerator(getEngine(), xml=1, source_file=None)
00088         parser = HTMLTALParser(gen)
00089         try:
00090             parser.parseString(value)
00091         except Exception, err:
00092             return ("Validation Failed(%s): \n %s" % (self.name, err))
00093         return 1
00094 
00095 validatorList.append(TALValidator('isTAL', title='', description=''))
00096 

Here is the caller graph for this function:


Member Data Documentation

Definition at line 78 of file validators.py.

Definition at line 83 of file validators.py.

Definition at line 81 of file validators.py.

Definition at line 82 of file validators.py.


The documentation for this class was generated from the following file: