Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion django_xlsform_validator/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"""

from rest_framework import serializers

from . import app_settings
from .validation import ERROR_VALUE_REQUIRED, ERROR_CONSTRAINT_UNSATISFIED


class SpreadsheetValidationSerializer(serializers.Serializer):
Expand Down Expand Up @@ -72,7 +74,7 @@ class ValidationErrorSerializer(serializers.Serializer):
help_text="Column number in the original spreadsheet."
)
error_type = serializers.CharField(
help_text="Type of error: 'type_mismatch', 'error_constraint_unsatisfied', or 'error_value_required'."
help_text=f"Type of error: 'type_mismatch', '{ERROR_CONSTRAINT_UNSATISFIED}', or '{ERROR_VALUE_REQUIRED}'."
)
error_explanation = serializers.CharField(
help_text="Human-readable explanation of the error."
Expand All @@ -82,6 +84,7 @@ class ValidationErrorSerializer(serializers.Serializer):
)
constraint_message = serializers.CharField(
required=False,
allow_null=True,
help_text="Custom constraint message from XLSForm if available."
)

Expand Down
Loading