🔒 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
  • 727
    Views
  • 4
    Participants
Last reply from:
kakazu

Trending Topics

Online now

Members online
877
Guests online
6,180
Total visitors
7,057

Forum statistics

Threads
2,351,475
Posts
29,371,682
Members
1,086,193
Latest member
hajaksk
Back
Top