(input, spec)
| 73 | |
| 74 | @staticmethod |
| 75 | def validate(input, spec): |
| 76 | try: |
| 77 | jsonschema.validate(input, spec, Draft3Validator) |
| 78 | except jsonschema.ValidationError as e: |
| 79 | raise validation.ValidationError(len(input), six.text_type(e)) |
| 80 | |
| 81 | def read(self): |
| 82 | message = self.template.format(self.prefix + self.name, **self.spec) |