(input, spec)
| 182 | |
| 183 | @staticmethod |
| 184 | def validate(input, spec): |
| 185 | if input: |
| 186 | try: |
| 187 | input = int(input) |
| 188 | except ValueError as e: |
| 189 | raise validation.ValidationError(len(input), six.text_type(e)) |
| 190 | |
| 191 | super(IntegerReader, IntegerReader).validate(input, spec) |
| 192 | |
| 193 | def _construct_template(self): |
| 194 | self.template = "{0} (integer)" |