form-value-in-the-wrong-control
This fails the run. Where it is wrong about your code, // ramonda-check-ignore <reason> on the line says so, and the reason is printed on every run.
Reported when a number a @ramonda/form field shows sits in a control that is not <input type="number"> or type="range", a day in one that is not type="date", or text in a number control or a checkbox (an input nobody edits, such as type="hidden", keeps any), or any of them in an <input> whose type cannot be read — or a field's .inputValue has a type the check cannot read, or is one no control's value shows (a boolean, which a box shows as checked).
A form field writes back what its control produced by the control's own type: type="number"
and type="range" hand back a number — whatever the field held, as an empty field could be waiting
for a number or text alike — and type="date" a day to a Date and text to a date written as text.
Every other control hands back its text. A number field without its type fills the form with text
on the first keystroke, a text field in a slider with a number, and the schema reports a value the
reader never typed wrong.
<input type="number" name={age.name} value={age.inputValue} oninput={age.oninput} />
<input type="date" name={born.name} value={born.inputValue} oninput={born.oninput} />
RMF005 reports the same in a running page, once the field holds a value of its own kind — which a
field that starts empty, edited through the wrong control, never does: that one is this check's to find.
Next
- All rules — the other checks this one runs beside.
- Checking your app — how to run it, and what it proves.