🔒 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: 28
  • result.webp
    result.webp
    20.6 KB · Views: 19
Status
Not open for further replies.

About this Thread

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

Trending Topics

Online now

Members online
1,115
Guests online
934
Total visitors
2,049

Forum statistics

Threads
2,274,832
Posts
28,958,616
Members
1,233,449
Latest member
Freo6777
Back
Top