How do I get FormBuilder to require numbers?
I am writing a Formbuilder for Latitude and Longitude. In this below,
- Writing -91 or 91 will give Validation errors, working as expected
- Anything between -90 and 90 works which is good.
- It accepts numbers up to 32 digits and decimal points, also working
Problem:
- However typing in Letters 'Abcd' etc, does Not give validation errors.
How can this be resolved?
'latitude': [null, [Validators.maxLength(32), Validators.min(-90), Validators.max(90)]],
Prefer to have validation in form, rather than input textbox type=number if possible,