Skip to content

Commit

Permalink
hotfix/allow-zero-in-reg-forms (#319)
Browse files Browse the repository at this point in the history
* hotfix/allow-zero-in-reg-forms

* Updated with proper regrex pattern

* - Updates with proper regex pattern

* - Keeps dollar amount pattern intact while
allowing for zero

---------

Co-authored-by: Chandra Y <[email protected]>
  • Loading branch information
sophia-massie and chandra-tacc authored Sep 20, 2024
1 parent 7db9706 commit bcc4641
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ <h6>
class="integerfield"
id="total_covered_lives_{{ent_no}}_{{r.reg_id}}"
inputmode="numeric"
pattern="^[1-9]+[0-9]*$"
pattern="^(0|[1-9][0-9]*)$"
value="{% if not renew %}{{ entity.no_covered }}{% endif %}"
/>
</div>
Expand All @@ -482,7 +482,7 @@ <h6>
class="integerfield"
id="claims_encounters_volume_{{ent_no}}_{{r.reg_id}}"
inputmode="numeric"
pattern="^[1-9]+[0-9]*$"
pattern="^(0|[1-9][0-9]*)$"
value="{% if not renew %}{{ entity.claim_and_enc_vol }}{% endif %}"
/>

Expand All @@ -506,7 +506,7 @@ <h6>
class="integerfield"
id="total_claims_value_{{ent_no}}_{{r.reg_id}}"
inputmode="numeric"
pattern="^(?=.*[1-9])[0-9]*[.]?[0-9]{1,2}$"
pattern="^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$"
value="{% if not renew %}{{ entity.claim_val }}{% endif %}"
/>
</div>
Expand Down Expand Up @@ -760,7 +760,7 @@ <h6>
class="integerfield"
id="total_covered_lives_1"
inputmode="numeric"
pattern="^[1-9]+[0-9]*$"
pattern="^(0|[1-9][0-9]*)$"
/>
</div>

Expand All @@ -778,7 +778,7 @@ <h6>
class="integerfield"
id="claims_encounters_volume_1"
inputmode="numeric"
pattern="^[1-9]+[0-9]*$"
pattern="^(0|[1-9][0-9]*)$"
/>

<div class="help-text">
Expand All @@ -801,7 +801,7 @@ <h6>
class="integerfield"
id="total_claims_value_1"
inputmode="numeric"
pattern="^(?=.*[1-9])[0-9]*[.]?[0-9]{1,2}$"
pattern="^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$"
/>
</div>
{# Additional entities rendered here... #}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ <h6>
class="integerfield"
id="total_covered_lives_${entities}${reg_id_substr}"
inputmode="numeric"
pattern="^[1-9]+[0-9]*$"
pattern="^(0|[1-9][0-9]*)$"
/>
<div id="help-text-total_covered_lives_${entities}" class="help-text">
</div>
Expand All @@ -333,7 +333,7 @@ <h6>
class="integerfield"
id="claims_encounters_volume_${entities}${reg_id_substr}"
inputmode="numeric"
pattern="^[1-9]+[0-9]*$"
pattern="^(0|[1-9][0-9]*)$"
/>
<div id="help-text-claims_encounters_volume_${entities}" class="help-text">
Enter a whole number.
Expand All @@ -352,7 +352,7 @@ <h6>
class="integerfield"
id="total_claims_value_${entities}${reg_id_substr}"
inputmode="numeric"
pattern="^(?=.*[1-9])[0-9]*[.]?[0-9]{1,2}$"
pattern="^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$"
/>
<div id="help-text-total_claims_value_${entities}" class="help-text">
</div>
Expand Down

0 comments on commit bcc4641

Please sign in to comment.