Search
 
SCRIPT & CODE EXAMPLE
 

CSS

form validation with css

// add requited attribute and pattern i html for mail : pattern="[a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,4}$" 
for only text pattern="^[a-zA-Z]+$" ,

required //

input[type="email"]:valid,input[name="name"]:valid {
	border: solid 3px green;
}
input[type="email"]:invalid:focus,input[name="name"]:invalid:focus {
	border: solid 3px red;
}
or 
input:required {
  border-color: #800000;
  border-width: 3px;
}

input:required:invalid {
  border-color: #c00000;
}





// regex for password

Minimum eight characters, at least one letter and one number:
"^(?=.*[A-Za-z])(?=.*d)[A-Za-zd]{8,}$"

Minimum eight characters, at least one letter, one number and one special character:
"^(?=.*[A-Za-z])(?=.*d)(?=.*[@$!%*#?&])[A-Za-zd@$!%*#?&]{8,}$"

Minimum eight characters, at least one uppercase letter, one lowercase letter and one number:
"^(?=.*[a-z])(?=.*[A-Z])(?=.*d)[a-zA-Zd]{8,}$"

Minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character:
"^(?=.*[a-z])(?=.*[A-Z])(?=.*d)(?=.*[@$!%*?&])[A-Za-zd@$!%*?&]{8,}$"

Minimum eight and maximum 10 characters, at least one uppercase letter, one lowercase letter, one number and one special character:
"^(?=.*[a-z])(?=.*[A-Z])(?=.*d)(?=.*[@$!%*?&])[A-Za-zd@$!%*?&]{8,10}$"
9
regex passwordJavascript By DieOver on May 11 2020 DonateThankComment
^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*])(?=.{8,})
Source:www.thepolyglotdeveloper.com
5
///// regex for user name 

# works in most newer browsers
^(?=.{8,20}$)(?![_.])(?!.*[_.]{2})[a-zA-Z0-9._]+(?<![_.])$
 └─────┬────┘└───┬──┘└─────┬─────┘└─────┬─────┘ └───┬───┘
       │         │         │            │           no _ or . at the end
       │         │         │            │
       │         │         │            allowed characters
       │         │         │
       │         │         no __ or _. or ._ or .. inside
       │         │
       │         no _ or . at the beginning
       │
       username is 8-20 characters long

# works in all browsers, but does the same as the above RegEx
^(?=[a-zA-Z0-9._]{8,20}$)(?!.*[_.]{2})[^_.].*[^_.]$
Comment

css validation

<p>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
    <img style="border:0;width:88px;height:31px"
        src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
        alt="Valid CSS!" />
    </a>
</p>
Comment

html css form validation

<input
  required 
  type="text" 
  id="first_name"
  name="first_name">
Comment

PREVIOUS NEXT
Code Example
Css :: css modal animation 
Css :: prevent mailto href indexing 
Css :: where is sendmail in lampp 
Css :: how to center each line of p class in csss 
Css :: alternate table row color css 
Css :: material css navbar 
Css :: tynker bot 
Css :: Netlify CMS mobile responsive CSS 
Css :: Spanning Items Across Rows and Columns 
Css :: how to make something unable to be highlighted css 
Css :: Structs in Golang 
Css :: css youtube video get rid of black border 
Css :: drag stretch effect in html css 
Css :: font sixe sss 
Css :: css sign in with google 
Css :: adding script in vat for product order shopify 
Css :: prevent the blue highlighting on mobile 
Css :: background image in css is not working 
Css :: animated display css 
Css :: media query min and max width for all devices 
Css :: how to add background shadow css 
Typescript :: sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread 
Typescript :: typescript record optional 
Typescript :: activate.ps1 cannot be loaded because running scripts is disabled on this system 
Typescript :: events on checkbox in jquery 
Typescript :: styled components hover 
Typescript :: how to delete all elements from hashmap in java except one 
Typescript :: useStae with array of strings typescript 
Typescript :: Testing Objects for Properties 
Typescript :: sass migrate division vue 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =