@pleegwat said in Making the Web Simple:
@ben_lubar said in Making the Web Simple:
@pleegwat said in Making the Web Simple:
@magus said in Making the Web Simple:
some client-side validation, for example
Can be as simple as
onsubmit="if( !/^[0-9]{6,}$/.test(this.some_number.value) ) { alert('Invalid some_number'); return false; }"
EW NO
<input type="text" required pattern="^[0-9]{6,}$" inputmode="numeric" name="some_number">
Hm, I didn't know that one. Thanks.
I think it's new to HTML5, yeh?