Here is the code
<%= form.number_field :marks,label: "CGPA*", maxlength:"4" %>

In this code, the form is a number field. How can I restrict its length? As shown in this picture it's taking more than 4 characters.
Here is the code
<%= form.number_field :marks,label: "CGPA*", maxlength:"4" %>

In this code, the form is a number field. How can I restrict its length? As shown in this picture it's taking more than 4 characters.