I have a problem with the validation of a number type field where the identification of a person must be placed, my data annotations is this
[Required(AllowEmptyStrings = false, ErrorMessage = "El RUT es Obligatorio")]
[RegularExpression("(^[0-9]+$)", ErrorMessage = "Solo se Permiten Números")]
[StringLength(10, ErrorMessage = "El RUT solo permite 10 dígitos")]
This is my view of Register
<div class="form-group col-md-6">
<label>RUT Paciente:</label>
<input asp-for="MODEL_PACIENTE.PAC_RUT" type="number" placeholder="RUT" class="form-control" autofocus />
<span asp-validation-for="MODEL_PACIENTE.PAC_RUT" class="text-danger"></span>
</div>
The error is when I put the letter e, it is the only letter that allows me to enter both uppercase and lowercase.
How can I correctly validate this field?