diff --git a/src/cl_sii/extras/dj_form_fields.py b/src/cl_sii/extras/dj_form_fields.py index 829f7e5b..fdf39c9d 100644 --- a/src/cl_sii/extras/dj_form_fields.py +++ b/src/cl_sii/extras/dj_form_fields.py @@ -66,7 +66,7 @@ def to_python(self, value: Optional[object]) -> Optional[Rut]: if ( converted_value is not None and self.validate_dv - and Rut.calc_dv(converted_value.digits) != converted_value.dv + and not converted_value.validate_dv(raise_exception=False) ): raise django.core.exceptions.ValidationError( self.error_messages['invalid_dv'],