Try
\d → for numbers
Screenshot
pattern="\d{15,15}"
Update on s1lence commentspattern="\d{15}"
Update to install Custom Validation MessageAdd this attribute to the input field.
oninvalid="this.setCustomValidity('15 digit number needed')"
Use as a comment on Yucca C. Corpel (check the script above for a working demo)
title="Exactly 15 digits"
source
share