这是这些表单字段的代码,但是我的验证格式不正确,请检查屏幕截图
<div class="row">
<div class="col s6 m6 input-field">
<%= f.text_field :first_name, maxlength: "50", required: true %>
<%= f.label :first_name, class: "form_label left required_field" %>
</div>
<div class="col s6 m6 input-field">
<%= f.text_field :last_name, class: "validate", maxlength: "50", required: true %>
<%= f.label :last_name, class: "form_label left required_field" %>
</div>
</div>