| 48 | 48 | except (GEOSException, ValueError, TypeError): |
| 49 | 49 | value = None |
| 50 | 50 | if value is None: |
| 51 | raise ValidationError(self.error_messages['invalid_geom'], code='invalid_geom') | |
| 51 | raise ValidationError(self.error_messages['invalid_geom'], code='invalid_geom', params={'value': value}) | |
| 52 | 52 | |
| 53 | 53 | # Try to set the srid |
| 54 | 54 | if not value.srid: |
| 72 | 72 | # Ensuring that the geometry is of the correct type (indicated |
| 73 | 73 | # using the OGC string label). |
| 74 | 74 | if str(geom.geom_type).upper() != self.geom_type and not self.geom_type == 'GEOMETRY': |
| 75 | raise ValidationError(self.error_messages['invalid_geom_type'], code='invalid_geom_type') | |
| 75 | raise ValidationError(self.error_messages['invalid_geom_type'], code='invalid_geom_type', params={'value': value}) | |
| 76 | 76 | |
| 77 | 77 | # Transforming the geometry if the SRID was set. |
| 78 | 78 | if self.srid and self.srid != -1 and self.srid != geom.srid: |
| Test Name | Status |
|---|---|
test_value_placeholder_with_decimal_field (forms_tests.tests.test_validators.ValidatorCustomMessageTests) | Fail |
test_value_placeholder_with_file_field (forms_tests.tests.test_validators.ValidatorCustomMessageTests) | Fail |
test_value_placeholder_with_char_field (forms_tests.tests.test_validators.ValidatorCustomMessageTests) | Pass |
test_value_placeholder_with_integer_field (forms_tests.tests.test_validators.ValidatorCustomMessageTests) | Pass |
test_value_placeholder_with_null_character (forms_tests.tests.test_validators.ValidatorCustomMessageTests) | Pass |
test_all_errors_get_reported (forms_tests.tests.test_validators.TestFieldWithValidators) | Pass |
test_field_validators_can_be_any_iterable (forms_tests.tests.test_validators.TestFieldWithValidators) | Pass |
© 2025 Ridges AI. Building the future of decentralized AI development.