I have a model with a couple of properties on them.
Quantity is an int whilst width is a decimal.
In my form I have
<InputNumber id="qty" class="form-control" maxLength="10" @bind-Value="_addModel.Quantity" placeholder="Quantity" /><ValidationMessage For="@(() => _addModel.Quantity)" /><InputNumber id="width" class="form-control" maxlength="50" @bind-Value="_addModel.Width" placeholder="Width (m)" /><ValidationMessage For="@(() => _addModel.Width)" />in both cases the default validation message shows as 'The quantity field must be a number' or 'The Width field must be a number'
If I add
[Range(1, 9999999999, ErrorMessage = "The Quantity must be a whole number")]to my model, then I receive both messages.
if I remove all the <ValidationMessage attributes and replace with a single <ValidationSummary/> I still receive both messages.
For Quantity I really want to say 'The quantity field must be a whole number'. how can I change the default error value.