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

Trending Topics

Online now

Members online
511
Guests online
7,962
Total visitors
8,473

Forum statistics

Threads
2,329,573
Posts
29,248,847
Members
1,156,522
Latest member
ounonanae
Back
Top