Three number-field limits shape a renewal quote form: the step value, the allowed range, and the default value. By default a number field accepts only whole numbers, so a quote that includes cents needs an explicit step, while the minimum, maximum and default values decide which amounts the form accepts and where it starts.
Big takeaways
- A number field accepts only whole numbers unless you set a step, because the default step is 1 (MDN Web Docs, HTML5 input types).
- Set the minimum and maximum to the amounts your quotes can take. MDN's slider example runs from 50000 to 500000.
- Give the field a default value with the value attribute, as MDN does with 250000.
- Mark required fields plainly. The WHATWG HTML Standard uses a simple form with two required fields as its example.
- Write form instructions that can be read aloud, since W3C calls this critical.
Why the step value decides which amounts pass
The step attribute sets the interval between the values a number field accepts. MDN's guide to HTML5 input types states the default: if the step is omitted, it defaults to 1, and only whole numbers are valid ( MDN Web Docs).
That default matters on a renewal quote because many of the figures in it carry cents. A premium, a fee or a prorated adjustment might include two decimal places rather than none. If the field has no step, the browser applies the whole-number rule to that entry. The customer sees a validation message and the form refuses the figure, even though the number is correct for the quote in front of them.
The fix belongs in your markup, not in the customer's typing. Set the step to match the precision your quotes use. If your renewal amounts show cents, set the step to 0.01 so two decimal places pass. If they only ever show whole units, keep the step at 1 but write it out anyway. An explicit step tells the next person who edits the form exactly what precision the field expects, without requiring them to know the default.
Before you publish a field, test it with a whole amount and then with an amount that has two decimals. Confirm that each one behaves the way the quote requires. This takes a minute and catches the mismatch before a customer does.
Comparing number, slider and tel inputs side by side
Three input types appear in MDN's examples, and each one fits a different kind of range. The MDN guide gives a working example for each, so you can compare their settings directly.
| Input type | Range in the MDN example | Step in the MDN example | What the customer gets |
|---|---|---|---|
| number | 0 to 1, inclusive | 0.01 | Increase and decrease buttons that change the value by 0.01 |
| slider | 50000 to 500000 | 1000 | A slider that moves 1000 at a time |
The number type is the one with spinner buttons. The slider type suits a wider range. The MDN example covers 50000 to 500000 and moves 1000 at a time, so a customer drags toward a rough figure instead of clicking through hundreds of increments.
The tel type solves a different problem. MDN notes that when the range is too large for incremental increases to make sense, the tel type might be a better option. Its example is USA ZIP codes, which run from 00001 to 99999. The tel type provides the numeric keypad but gives up the spinner, which suits an identifier that a customer types rather than an amount they nudge.
For a renewal form, the question is which kind of value each field holds. An amount a customer edits in small increments fits number or slider. A numeric reference that a customer types in full fits tel. The wrong type changes how the field feels to use, so choose it on purpose.
A range that moves in 0.01 steps
The MDN example for the number type creates a control restricted to any value between 0 and 1 inclusive, with increase and decrease buttons that change the value by 0.01. That single example holds three settings you can copy and adapt: a minimum, a maximum and a step.
| Setting | Value in the MDN example | Effect on the customer |
|---|---|---|
| Minimum | 0 | The lowest accepted value, and 0 itself is valid |
| Maximum | 1 | The highest accepted value, and 1 itself is valid |
| Step | 0.01 | Each button press changes the value by one hundredth |
"Inclusive" matters. The minimum and maximum are valid values in their own right, so a customer can enter exactly 0 or exactly 1. If your renewal field has an upper limit, set the maximum to the largest value you accept and say so in the field's instructions. Do not leave the limit implied.
The 0.01 step is what makes a fractional range usable with buttons. Each click moves the figure by one hundredth, which keeps two decimal places meaningful. Pair this with the precision rule from the previous section: the step and the range should use the same units. If the step is finer than the quote's own precision, customers will click through increments the quote never displays.
When you adapt this pattern, change one setting at a time and retest after each change. Changing the minimum, the maximum and the step together makes it hard to tell which change caused a problem.
Setting a default value that starts the quote
The MDN slider example gives the control a default value of 250000 using the value attribute. The default is the figure the field shows before the customer types anything, so it sets the starting point of the quote.
That default sits inside the slider's range of 50000 to 500000, and it is also a multiple of the 1000 step. Both properties matter. A starting figure that does not fit the step is harder to justify, because the control moves in fixed increments from its settings.
The check is quick. Confirm that the starting figure falls within the range and matches the step, so the first value a customer sees is a valid quote figure. Then keep the default in the markup, with the value attribute, rather than in a script that runs later. An editor reading the form can then see the starting figure without tracing code.
For a renewal form, the default is usually the figure you want the customer to see first, such as the amount from the current term. Set it deliberately. A default that is simply the first value in the range tells the customer nothing about the quote they are reviewing.
Text length limits on the same form
Number fields are not the only limits on a quote form. The MDN form validation tutorial gives a text field a minlength and a maxlength of 6, the same length as the example values banana and cherry ( MDN Web Docs).
The matching case on a renewal form is a text field that holds a fixed-length code, such as a reference number. The length you use depends on your code. The MDN example shows the mechanism, not a standard length for any particular code.
Length limits and numeric limits do the same job. Both move checks from the back office into the form. A customer who sees a message while typing fixes the entry in seconds. A customer who submits a rejected quote and waits for a reply loses time and confidence in the process.
Test length rules the same way you test number fields. Enter one value that is too short, one that is exactly the right length, and one that is too long. Confirm that each one produces the result you intend. If a rule passes a value it should reject, fix the markup before the form goes live.
Marking required fields on a renewal form
Some fields on a renewal quote cannot be left empty. The quote cannot be checked without the premium, the term dates or the customer's account reference, so the form should say clearly which fields are required. The WHATWG HTML Standard illustrates this with a simple form that has two required fields.
Do not rely on a visual cue alone, such as a red label or a star, because a cue that only shows on screen tells a customer less than a rule the form enforces. Pair the visual cue with words in the label, so the requirement is stated in the same place the customer reads the field name.
Keep the required set small. Each extra required field is one more place where a customer can stop and leave. Fields that are useful but not essential, such as a discount code or a secondary contact, should stay optional. Ask of each field whether the quote can be checked without it. If the answer is yes, leave it unmarked.
Test the required rules before you publish. Submit the form with one required field empty and confirm that the form refuses to continue and points to that field. Then fill in every required field and confirm that the form accepts the submission. Repeat the test for each required field, since a rule that works for one field can be missing from another that was added later.
Writing instructions that can be read aloud
The W3C Web Accessibility Initiative states that it is critical to include form instructions in ways that can be read aloud. For a renewal form, this means the guidance a customer needs to enter a figure must be present as text attached to the field, not only as a visual hint, an input hint that disappears, or a note placed far from the input.
Consider the precision of a premium. If your number field accepts cents, the instruction should say so in words, for example that the amount can include up to two decimal places. A customer using a screen reader will hear the label and the instruction as they reach the field. Without the instruction in text, they may not learn the precision rule until the form rejects their entry.
Write each instruction as a short, complete sentence. State the format the field expects and the range it accepts, and avoid stacking several rules into one long line. Where the field has a default value, say so, so a customer who sees a figure already filled in knows that it is a starting point and can be changed.
Place the instruction next to the field it describes and connect it to that field in the markup, so it is read in sequence with the label. An instruction that sits in a separate panel at the top of the page may be missed by a customer who has moved on to the input.
Check the instructions against the limits you have set. If the step is 0.01, the text should not promise whole units. If the range has an upper limit, the text should state it. An instruction that disagrees with the field's own settings sends the customer the wrong message, and it can be harder to notice than a validation error.
Which one should you pick?
When a renewal amount needs a number field, the choice is usually between the number type and the slider type. The two MDN examples show the difference in their settings. The slider example runs from 50000 to 500000, moves 1000 at a time, and starts at 250000 ( MDN Web Docs).
| Option | Example range | Example step | Example default | Choose it when |
|---|---|---|---|---|
| Slider | 50000 to 500000 | 1000 | 250000 | The customer picks a rough figure across a wide range |
For most renewal amounts, the slider's example step is the wrong default. A step of 1000 would only accept whole increments of 1000 from its minimum, so an amount with cents would be refused. If you use a slider for a premium, set the step to match the precision your quotes use, and check that the starting figure falls within the range and matches the step.
If the amount is small and needs exact cents, the number type with a fine step is usually the better fit. If the amount spans a wide range and the customer needs a rough figure, the slider can work, provided the step is still set for the quote's precision. In either case, the field's settings must match what the quote can contain.
Make the decision once and document it in the form's markup, so the next editor knows why the field behaves as it does.
Required fields and read-aloud instructions together
Required fields and read-aloud instructions work together. A required field tells the customer that a value is needed, and an instruction tells them what a valid value looks like. Each alone leaves a gap. A required marker without an instruction leaves the customer guessing about the format. An instruction without a required marker leaves them unsure whether they can skip the field.
Combine the two in the label or in text attached to the field. For example, a field can state that it is required and name the format in the same sentence. The WHATWG example with two required fields is a useful model for keeping the form plain: a short set of required fields, each one clearly identified.
Error messages need the same care. When the form refuses a submission, the message should name the field and state the rule that was broken. A message such as "this field is required" is easier to act on when it also tells the customer what to enter. Because the message may be read aloud, it should make sense without the visual layout around it.
Review each required field with its instruction and its error message together. Read them in sequence, as a customer using a screen reader would hear them. If the sequence is unclear, rewrite the text before publishing.
Checking the limits before a quote goes out
Before a renewal quote form goes live, check each field against the rules you have set. Start with the required fields. Each one should be marked in the markup, and the form should refuse a submission when it is empty. Test this by submitting the form with the field blank and confirming the result.
Next, check the number settings. Confirm that the step matches the precision your quotes use, and that the minimum and maximum are the amounts the quote can take. Give the default value the same check: it must fall within the range and match the step, so the first figure a customer sees is valid.
Then check the instructions. Each field that needs a format should have that format stated in text, and the text should match the field's settings. Confirm that no instruction promises a precision the step does not allow.
Finally, run each field with three kinds of entry: a value that should pass, a value that should fail, and an empty entry for any required field. Record what the form does for each one. Keep the checklist with the form, so the next person who edits a number field can repeat the same checks.
- Required fields are marked and refuse an empty submission.
- The step matches the precision of the quote.
- The minimum and maximum match the amounts the quote can take.
- The default value falls within the range and matches the step.
- Each instruction is written as text and agrees with the field's settings.
- Each error message names the field and the rule it broke.
Related guides: Email field settings: 4 checks for customer invites · Renewal portal review: 6 figures to quote and test · Accessible password fields: 8 settings to check.
Reader questions
Does a required field need to be marked in the markup?
How many fields should a renewal form require? Keep the required set to the fields the quote cannot be checked without, and leave useful but non-essential fields optional.
Is an asterisk enough to show that a field is required? It is a visual cue, and a visual cue alone does not reach every customer. The W3C Web Accessibility Initiative calls it critical to include form instructions in ways that can be read aloud, so state the requirement in words as well.
Why does an amount with cents fail in a number field? When the step is omitted, it defaults to 1, and only whole numbers are valid, according to MDN.
Should I use a slider for a renewal premium? Use a slider only when the customer needs a rough figure across a wide range, and set the step for the quote's precision. The example slider's step of 1000 would not accept an amount with cents, because the control moves in whole increments of 1000 from its minimum.
What should an instruction for a number field say? It should state the format the field expects, such as the number of decimal places, and the range it accepts. Keep it in text attached to the field so it can be read aloud with the label.
What should an error message for a required field include? It should name the field and state the rule that was broken. Because the message may be read aloud, it should make sense without the layout around it.
How do I know the limits are right before a quote goes out? Run each field with a value that should pass, a value that should fail, and an empty entry for any required field. Record the results, and repeat the checks whenever someone edits a field.
Sources
Limits of this post
This post is general operational information, not legal advice about notice periods or renewal clauses. It does not promise that any method keeps a customer. Software can get a fact wrong, so open the sources before you act.