-
Type: Feature Request
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.2.2-B1
-
Component/s: Admin Interfaces, Front End
-
Labels:
-
Change Log Group:Added
-
Change Log Message:Added ability to use field title in the validation error messages (e.g. "First Name is required" instead of "Field is required").
-
Story Points:1
-
Copy Issue Key:
-
Patch Instructions:
-
BC Break Details:
1. locate "SetError" methods calls in the "kValidator" class, where additional parameters are passed to the error (I found 3)
2. in each found case transform index-based parameter array into associative array by assigning name for each of given parameters
3. in the "GetErrorMsg" method:
- add "array_values" before giving error params to "vsprintf" function
- after call to "ReplaceLanguageTags" we need to add "field" parameter to the error parameters, which value would be translation of this phrase: "la_fld_FieldName" (in Admin Console) and "lu_fld_FieldName" (on Front-End)
- replace all named parameter occurrences in a string (before "la-la
{param_name}
la-la", after "la-la value_of_param_name_parameter la-la")
- after named parameter is replaced (check number of actual replacements made) remove it from parameter list
- bc break fixed by
-
INP-1688 Support both "%s" and "{param_name}" in validation error messages
- Resolved
- implemented in
-
[Request, 61 lines] D2 INP-1380 - Use named parameters in error messages and add new parameter {field}