🔒 Closed Tip - html form input validation

Status
Not open for further replies.

codyscott

Honorary Poster
Just in case na hindi nyo pa alam.
Isang tip kung paano lagyan ng "preliminary" validation sa form input.

1) add "required" attribute sa <input type="email" required>

2) use "pattern" attribute sa password field <input type="password" pattern=".{8,16}" >

Check attached snapshots.

Enjoy coding HTML!
:)
 

Attachments

  • code.webp
    code.webp
    52.4 KB · Views: 31
  • result.webp
    result.webp
    20.6 KB · Views: 22
Status
Not open for further replies.

About this Thread

  • 4
    Replies
  • 719
    Views
  • 4
    Participants
Last reply from:
kakazu

Trending Topics

Online now

Members online
1,234
Guests online
3,692
Total visitors
4,926

Forum statistics

Threads
2,306,661
Posts
29,173,385
Members
1,193,978
Latest member
donjulian
Back
Top