Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more input tips #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 34 additions & 6 deletions inputs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,42 @@ <h2>E-mail</h2>
<h2>Regex validations</h2>
<form>
<label for="password">Strong password($Password1234):</label>
<input type="password"
name="password"
id="password"
placeholder="6-20 chars, at least 1 digit, 1 uppercase and one lowercase letter"
pattern="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,20}$" autofocus required>
<input type="password" name="password" id="password"
placeholder="6-20 chars, at least 1 digit, 1 uppercase and one lowercase letter"
pattern="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,20}$" autofocus required>
<button type="submit"> Test </button>
</form>
</div>
</div>

<div class="box">
<h2>Allow only integer</h2>
<form>
<label for="intfield">Allow only integer</label>
<input id="intfield" type="text" onkeypress='return event.charCode >= 48 && event.charCode <= 57' maxlength="10">
</form>
</div>

<div class="box">
<h2>Mobile Number validation using Regex (Allow only the phone number which starts with 7,8 and 9)</h2>
<form>
<label for="mobilenumbervalidation">Mobile Number</label>
<input id="mobilenumbervalidation" type="text" pattern="[789][0-9]{9}" autofocus required>
<button type="submit"> Test </button>
</form>
</div>


<div class="box">
<h2>Full Name Validation</h2>
<form>
<label for="fullnamevalidationid">Full Name</label>
<input id="fullnamevalidationid" type="text" name="fullName" onkeypress="return (event.charCode > 64 &&
event.charCode < 91) || (event.charCode > 96 && event.charCode < 123)" placeholder="Full Name">
<button type="submit"> Test </button>
</form>
</div>


</div>
</body>

Expand Down