如果我有一个rails字段:
<div class="field form-group">
<%= f.label :x_size, class: 'col-sm-1 control-label' %>
<div class="col-sm-3">
<%= f.text_field :x_size, class: 'form-control' %>
</div>
</div>
<div class="actions form-group">
<div class="col-sm-2">
<%= f.submit 'Submit', :class => 'btn btn-primary' %>
</div>
</div>
如何验证提交按钮仅适用于数字输入?