diff --git a/src/main/resources/templates/fragments/cardHeaderForSingleInputScreen.html b/src/main/resources/templates/fragments/cardHeaderForSingleInputScreen.html index eeea0f34..f7ac25e7 100644 --- a/src/main/resources/templates/fragments/cardHeaderForSingleInputScreen.html +++ b/src/main/resources/templates/fragments/cardHeaderForSingleInputScreen.html @@ -3,7 +3,7 @@ th:with=" hasSubtext=${!#strings.isEmpty(subtext)}, requiredInputsForFlow=${requiredInputs.get(flow)}, - isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}" + isRequiredInput=${(requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}" th:assert="${!#strings.isEmpty(header)}" class="form-card__header">

diff --git a/src/main/resources/templates/fragments/inputs/checkbox.html b/src/main/resources/templates/fragments/inputs/checkbox.html index ec8e3971..c1d710dd 100644 --- a/src/main/resources/templates/fragments/inputs/checkbox.html +++ b/src/main/resources/templates/fragments/inputs/checkbox.html @@ -4,7 +4,7 @@ hasHelpText=${!#strings.isEmpty(checkboxHelpText)}, hasIcon=${!#strings.isEmpty(checkboxIcon)}, requiredInputsForFlow=${requiredInputs.get(flow)}, - isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, + isRequiredInput=${(requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, name=${inputName} + '[]', hasError=${ errorMessages != null && diff --git a/src/main/resources/templates/fragments/inputs/checkboxFieldset.html b/src/main/resources/templates/fragments/inputs/checkboxFieldset.html index 4e779cf8..896c4b1a 100644 --- a/src/main/resources/templates/fragments/inputs/checkboxFieldset.html +++ b/src/main/resources/templates/fragments/inputs/checkboxFieldset.html @@ -5,7 +5,7 @@ hasLabel=${!#strings.isEmpty(label)}, hasAriaLabel=${!#strings.isEmpty(ariaLabel)}, requiredInputsForFlow=${requiredInputs.get(flow)}, - isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, + isRequiredInput=${(requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, hasError=${ errorMessages != null && errorMessages.get(inputName) != null && diff --git a/src/main/resources/templates/fragments/inputs/date.html b/src/main/resources/templates/fragments/inputs/date.html index bfbc5f91..62212f6a 100644 --- a/src/main/resources/templates/fragments/inputs/date.html +++ b/src/main/resources/templates/fragments/inputs/date.html @@ -4,9 +4,9 @@ hasLabel=${!#strings.isEmpty(label)}, hasAriaLabel=${!#strings.isEmpty(ariaLabel)}, requiredInputsForFlow=${requiredInputs.get(flow)}, - isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName + 'Month', false)) || - (requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName + 'Day', false)) || - (requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName + 'Year', false)) || + isRequiredInput=${(requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName + 'Month', false)) || + (requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName + 'Day', false)) || + (requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName + 'Year', false)) || (required != null && required)}, hasAutoCompleteMonth=${!#strings.isEmpty(autoCompleteMonth)}, hasAutoCompleteDay=${!#strings.isEmpty(autoCompleteDay)}, diff --git a/src/main/resources/templates/fragments/inputs/money.html b/src/main/resources/templates/fragments/inputs/money.html index 0936ea90..f9656d3b 100644 --- a/src/main/resources/templates/fragments/inputs/money.html +++ b/src/main/resources/templates/fragments/inputs/money.html @@ -5,7 +5,7 @@ hasLabel=${!#strings.isEmpty(label)}, hasAriaLabel=${!#strings.isEmpty(ariaLabel)}, requiredInputsForFlow=${requiredInputs.get(flow)}, - isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, + isRequiredInput=${(requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, hasError=${ errorMessages != null && errorMessages.get(inputName) != null && diff --git a/src/main/resources/templates/fragments/inputs/number.html b/src/main/resources/templates/fragments/inputs/number.html index 0a9e0e4c..649d5a01 100644 --- a/src/main/resources/templates/fragments/inputs/number.html +++ b/src/main/resources/templates/fragments/inputs/number.html @@ -8,7 +8,7 @@ hasAriaLabel=${!#strings.isEmpty(ariaLabel)}, hasAutoComplete=${!#strings.isEmpty(autoComplete)}, requiredInputsForFlow=${requiredInputs.get(flow)}, - isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, + isRequiredInput=${(requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, hasError=${ errorMessages != null && errorMessages.get(inputName) != null && diff --git a/src/main/resources/templates/fragments/inputs/phone.html b/src/main/resources/templates/fragments/inputs/phone.html index 7db4d006..5096ead1 100644 --- a/src/main/resources/templates/fragments/inputs/phone.html +++ b/src/main/resources/templates/fragments/inputs/phone.html @@ -6,7 +6,7 @@ hasAriaLabel=${!#strings.isEmpty(ariaLabel)}, hasAutoComplete=${!#strings.isEmpty(autoComplete)}, requiredInputsForFlow=${requiredInputs.get(flow)}, - isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, + isRequiredInput=${(requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, hasError=${ errorMessages != null && errorMessages.get(inputName) != null && diff --git a/src/main/resources/templates/fragments/inputs/radioFieldset.html b/src/main/resources/templates/fragments/inputs/radioFieldset.html index fa52e0a7..9f43680e 100644 --- a/src/main/resources/templates/fragments/inputs/radioFieldset.html +++ b/src/main/resources/templates/fragments/inputs/radioFieldset.html @@ -5,7 +5,7 @@ hasLabel=${!#strings.isEmpty(label)}, hasAriaLabel=${!#strings.isEmpty(ariaLabel)}, requiredInputsForFlow=${requiredInputs.get(flow)}, - isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, + isRequiredInput=${(requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, hasError=${ errorMessages != null && errorMessages.get(inputName) != null && diff --git a/src/main/resources/templates/fragments/inputs/select.html b/src/main/resources/templates/fragments/inputs/select.html index 1056a131..e6a83389 100644 --- a/src/main/resources/templates/fragments/inputs/select.html +++ b/src/main/resources/templates/fragments/inputs/select.html @@ -6,7 +6,7 @@ hasAriaLabel=${!#strings.isEmpty(ariaLabel)}, hasAutoComplete=${!#strings.isEmpty(autoComplete)}, requiredInputsForFlow=${requiredInputs.get(flow)}, - isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, + isRequiredInput=${(requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, hasError=${ errorMessages != null && errorMessages.get(inputName) != null && diff --git a/src/main/resources/templates/fragments/inputs/ssn.html b/src/main/resources/templates/fragments/inputs/ssn.html index bef1c083..d74b0302 100644 --- a/src/main/resources/templates/fragments/inputs/ssn.html +++ b/src/main/resources/templates/fragments/inputs/ssn.html @@ -5,7 +5,7 @@ hasLabel=${!#strings.isEmpty(label)}, hasAriaLabel=${!#strings.isEmpty(ariaLabel)}, requiredInputsForFlow=${requiredInputs.get(flow)}, - isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, + isRequiredInput=${(requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, hasError=${ errorMessages != null && errorMessages.get(inputName) != null && diff --git a/src/main/resources/templates/fragments/inputs/text.html b/src/main/resources/templates/fragments/inputs/text.html index 4580f3eb..33a55bca 100644 --- a/src/main/resources/templates/fragments/inputs/text.html +++ b/src/main/resources/templates/fragments/inputs/text.html @@ -6,7 +6,7 @@ hasAriaLabel=${!#strings.isEmpty(ariaLabel)}, hasAutoComplete=${!#strings.isEmpty(autoComplete)}, requiredInputsForFlow=${requiredInputs.get(flow)}, - isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, + isRequiredInput=${(requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, hasError=${ errorMessages != null && errorMessages.get(inputName) != null && diff --git a/src/main/resources/templates/fragments/inputs/textArea.html b/src/main/resources/templates/fragments/inputs/textArea.html index b904aabc..e9badf17 100644 --- a/src/main/resources/templates/fragments/inputs/textArea.html +++ b/src/main/resources/templates/fragments/inputs/textArea.html @@ -8,7 +8,7 @@ rows=${!#strings.isEmpty(rows)} ? ${rows} : '6', maxLength=${!#strings.isEmpty(maxLength)} ? ${maxLength} : '500', requiredInputsForFlow=${requiredInputs.get(flow)}, - isRequiredInput=${(requiredInputsForFlow != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, + isRequiredInput=${(requiredInputsForFlow != null && inputName != null && requiredInputsForFlow.getOrDefault(inputName, false)) || (required != null && required)}, hasError=${ errorMessages != null && errorMessages.get(inputName) != null &&