Merge pull request #4434 from Yashh56/fix/funnel-val
fix(funnel): add client-side validation to funnel window input
This commit is contained in:
3 files changed
+10
-1
No files matched your search
@@ -442,6 +442,7 @@
|
|||||||
"go-to-settings": "Go to settings",
|
"go-to-settings": "Go to settings",
|
||||||
"incorrect-username-password": "Incorrect username and/or password.",
|
"incorrect-username-password": "Incorrect username and/or password.",
|
||||||
"invalid-domain": "Invalid domain. Do not include http/https.",
|
"invalid-domain": "Invalid domain. Do not include http/https.",
|
||||||
|
"invalid-value": "Invalid value",
|
||||||
"min-password-length": "Minimum length of {n} characters",
|
"min-password-length": "Minimum length of {n} characters",
|
||||||
"new-version-available": "A new version of Umami {version} is available!",
|
"new-version-available": "A new version of Umami {version} is available!",
|
||||||
"no-data-available": "No data available.",
|
"no-data-available": "No data available.",
|
||||||
|
|||||||
@@ -200,7 +200,14 @@ export function FunnelEditForm({
|
|||||||
<FormField name="name" label={t(labels.name)} rules={{ required: t(labels.required) }}>
|
<FormField name="name" label={t(labels.name)} rules={{ required: t(labels.required) }}>
|
||||||
<TextField autoFocus />
|
<TextField autoFocus />
|
||||||
</FormField>
|
</FormField>
|
||||||
<FormField name="window" label={t(labels.window)} rules={{ required: t(labels.required) }}>
|
<FormField
|
||||||
|
name="window"
|
||||||
|
label={t(labels.window)}
|
||||||
|
rules={{
|
||||||
|
required: t(labels.required),
|
||||||
|
pattern: { value: /^[1-9][0-9]*$/, message: t(labels.invalidValue) || 'Must be greater than 0' },
|
||||||
|
}}
|
||||||
|
>
|
||||||
<TextField />
|
<TextField />
|
||||||
</FormField>
|
</FormField>
|
||||||
<FormFieldArray
|
<FormFieldArray
|
||||||
|
|||||||
@@ -362,6 +362,7 @@ export const labels: Record<string, string> = {
|
|||||||
slug: 'label.slug',
|
slug: 'label.slug',
|
||||||
audience: 'label.audience',
|
audience: 'label.audience',
|
||||||
invalidUrl: 'label.invalid-url',
|
invalidUrl: 'label.invalid-url',
|
||||||
|
invalidValue: 'message.invalid-value',
|
||||||
environment: 'label.environment',
|
environment: 'label.environment',
|
||||||
criteria: 'label.criteria',
|
criteria: 'label.criteria',
|
||||||
share: 'label.share',
|
share: 'label.share',
|
||||||
|
|||||||
Reference in new issue
Block a user