You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: engine-shared/elm/Shared/Form/Validate.elm
+18-6Lines changed: 18 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
moduleShared.Form.Validateexposing
2
2
( confirmation
3
3
, dict
4
+
, documentTemplateId
4
5
, ifElse
5
6
, kmId
7
+
, localeId
6
8
, maybeString
7
9
, optionalInt
8
10
, optionalString
@@ -121,14 +123,24 @@ uuid =
121
123
|>V.map Uuid.fromUuidString
122
124
123
125
124
-
organizationId:ValidationFormErrorString
125
-
organizationId =
126
-
regex RegexPatterns.organizationId "Organization ID can only contain alphanumeric characters and dots. It must start and end with an alphanumeric character."
126
+
organizationId:{ a | locale : Gettext.Locale } ->ValidationFormErrorString
127
+
organizationId appState =
128
+
regex RegexPatterns.organizationId (gettext "Fill in a valid organization ID." appState.locale)
127
129
128
130
129
-
kmId:ValidationFormErrorString
130
-
kmId =
131
-
regex RegexPatterns.kmId "Knowledge Model ID can only contain alphanumeric characters and hyphens. It must start and end with an alphanumeric character."
131
+
kmId: { a | locale : Gettext.Locale } ->ValidationFormErrorString
132
+
kmId appState =
133
+
regex RegexPatterns.kmId (gettext "Fill in a valid knowledge model ID." appState.locale)
134
+
135
+
136
+
documentTemplateId: { a | locale : Gettext.Locale } ->ValidationFormErrorString
137
+
documentTemplateId appState =
138
+
regex RegexPatterns.documentTemplateId (gettext "Fill in a valid document template ID." appState.locale)
139
+
140
+
141
+
localeId: { a | locale : Gettext.Locale } ->ValidationFormErrorString
142
+
localeId appState =
143
+
regex RegexPatterns.localeId (gettext "Fill in a valid locale ID." appState.locale)
132
144
133
145
134
146
projectTag: { a | locale : Gettext.Locale } ->ValidationFormErrorString
0 commit comments