I'm using below html tag and not able to get the restrictions on numbers, I need user to enter 12 digit only however as per HTML tag by default 'maxlength' does not work with <input type ="number">, I tried min and max tag, it did not help either.
Could you share if any way to do it in HTML only?
<input type="number" name="Aadhar" maxlength="12" placeholder="xxxx-xxxx-xxxx" pattern="[0-9]{4}-[0-9]{4}-[0-9]{4}" required>

Unfortunately,
maxlengthattribute is not supported for inputs that are typenumber. Therefore, the best approach is to use JS. Please refer to the following documentation and they might provide some clarity.