Skip to content

Commit 562461f

Browse files
committed
Fix units regex
1 parent ce9be64 commit 562461f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/templates/input_types.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
<!-- number type -->
126126
<input type="number" class="form-control" id="{{key}}" name="{{key}}" value="{{input_value}}" aria-describedby="help{{key}}" {% if value.required %}required{%endif%} {% if min_value %}min="{{min_value[0]}}"{%endif%} {% if max_value %}max="{{max_value[0]}}"{%endif%}/>
127127
{% elif value.type == "scalar-unit.size" %}
128-
<input type="text" class="form-control" id="{{key}}" name="{{key}}" value="{{input_value}}" pattern="[0-9]*( )([TMG]B)" title="Number Unit(MB, GB or TB)">
128+
<input type="text" class="form-control" id="{{key}}" name="{{key}}" value="{{input_value}}" pattern="[0-9]*( )[TMG]i{0,1}B" title="Number Unit(MB, GB or TB)">
129129
{% else %}
130130
<!-- text type, hide fields with password -->
131131
<input {% if 'password' in key %}type="password"{% else %}type="text"{% endif %} class="form-control" id="{{key}}" name="{{key}}" value="{{input_value}}" aria-describedby="help{{key}}" {% if value.required %}required{%endif%} {% if min_length %}minlength="{{min_length[0]}}"{%endif%} {% if max_length %}maxlength="{{max_length[0]}}"{%endif%}/>

0 commit comments

Comments
 (0)