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

Trending Topics

Online now

Members online
383
Guests online
1,293
Total visitors
1,676

Forum statistics

Threads
2,285,847
Posts
29,033,922
Members
1,218,673
Latest member
Oninboi
Back
Top