mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 22:42:32 -05:00
improve required field handling
This commit is contained in:
1 parent
f1a2b71b59
commit
28e3d65e63
3 files changed
+55
-15
No files matched your search
@@ -1404,7 +1404,13 @@ export default {
|
||||
if (response.status === 422 || response.status === 500) {
|
||||
const data = await response.json()
|
||||
|
||||
if (data.error) {
|
||||
if (data.field_uuid) {
|
||||
const field = this.fieldsUuidIndex[data.field_uuid]
|
||||
|
||||
this.goToStep(this.stepFields.findIndex((fields) => fields.includes(field)), this.autoscrollFields)
|
||||
|
||||
this.showFillAllRequiredFields = true
|
||||
} else if (data.error) {
|
||||
const i18nKey = data.error.replace(/\s+/g, '_').toLowerCase()
|
||||
|
||||
alert(this.t(i18nKey) !== i18nKey ? this.t(i18nKey) : data.error)
|
||||
|
||||
Reference in new issue
Block a user