Skip to content

Commit

Permalink
clients/web: fix custom field error validation display
Browse files Browse the repository at this point in the history
  • Loading branch information
frankie567 committed Nov 7, 2024
1 parent df52d14 commit 01dfec3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const CreateCustomFieldModalContent = ({
const body = await e.response.json()
if (e.response.status === 422) {
const validationErrors = body['detail'] as ValidationError[]
setValidationErrors(validationErrors, setError, 1)
setValidationErrors(validationErrors, setError, 2)
}
}
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ const CustomFieldForm: React.FC<CustomFieldFormBaseProps> = ({ update }) => {
<FormMessage />
<FormDescription>
Will be used as a key when storing the value. Must be unique
across your organization.
across your organization. It can only contain ASCII letters,
numbers and hyphens.
</FormDescription>
</FormItem>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const UpdateCustomFieldModalContent = ({
const body = await e.response.json()
if (e.response.status === 422) {
const validationErrors = body['detail'] as ValidationError[]
setValidationErrors(validationErrors, setError, 1)
setValidationErrors(validationErrors, setError, 2)
}
}
} finally {
Expand Down

0 comments on commit 01dfec3

Please sign in to comment.