Friday, June 20, 2014

HTML 5 FORM VALIDATION

http://html5pattern.com/
1 TEXT

 <input type="text" class="" name="name" id="name" pattern="^[a-zA-Z][a-zA-Z0-9-_\.]{1,20}$" placeholder="John/Jane Doe" required>

2 EMAIL
 <input type="email" class="" name="email" id="email" pattern="/^[a-zA-Z0-9.+/=_-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)/" placeholder="john_doe@example.com" required>

3 WEB
<input type="url" class="" name="web" id="web" pattern="https?://.+"  placeholder="http:// " required>

No comments:

Post a Comment