Logo Search packages:      
Sourcecode: zope-atextensions version File versions  Download package

def ATExtensions::field::records::RecordsField::validate (   self,
  value,
  instance,
  errors = {},
  kwargs 
)

Validate passed-in value using all subfield validators.
Return None if all validations pass; otherwise, return failed
result returned by validator

Definition at line 117 of file records.py.

00117                                                    {}, **kwargs):
            """
            Validate passed-in value using all subfield validators.
            Return None if all validations pass; otherwise, return failed
            result returned by validator
            """
            name = self.getName()
            if errors and errors.has_key(name):
                return True

            result = None
            for record in value:
                result = RecordField.validate(self,
                                              record,
                                              instance,
                                              errors={},
                                              **kwargs
                                              )
                if result: return result
            return result

InitializeClass(RecordsField)

registerField(RecordsField,
              title="Records",
              description="Used for storing a list of records",
              )

registerPropertyType('subfields', 'lines', RecordsField)
registerPropertyType('required_subfields', 'lines', RecordField)
registerPropertyType('subfield_validators', 'mapping', RecordField)
registerPropertyType('subfield_types', 'mapping', RecordsField)
registerPropertyType('subfield_vocabularies', 'mapping', RecordsField)
registerPropertyType('subfield_labels', 'mapping', RecordsField)
registerPropertyType('subfield_sizes', 'mapping', RecordsField)
registerPropertyType('subfield_maxlength', 'mapping', RecordsField)
registerPropertyType('innerJoin', 'string', RecordsField)
registerPropertyType('fixedSize', 'boolean', RecordsField)
registerPropertyType('minimalSize', 'int', RecordsField)
registerPropertyType('maximalSize', 'int', RecordsField)
registerPropertyType('maximalSize', 'int', RecordsField)


Generated by  Doxygen 1.6.0   Back to index