Forms Validation States - HTML CSS Bootstrap

HTML CSS examples for Bootstrap:Form Control


Forms Validation States

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
  <meta charset="utf-8"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <title>Example of Bootstrap 3 Forms Validation States</title> 
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>

 </head> <!--from  www .j  a va  2s  . c o m-->
   <form class="form-horizontal"> 
    <div class="form-group has-success"> 
     <label class="col-xs-2 control-label" for="inputSuccess">Username</label> 
     <div class="col-xs-10"> 
      <input type="text" id="inputSuccess" class="form-control" placeholder="Input with success"> 
      <span class="help-block">Username is available</span> 
    <div class="form-group has-warning"> 
     <label class="col-xs-2 control-label" for="inputWarning">Password</label> 
     <div class="col-xs-10"> 
      <input type="password" id="inputWarning" class="form-control" placeholder="Input with warning"> 
      <span class="help-block">Password strength: Weak</span> 
    <div class="form-group has-error"> 
     <label class="col-xs-2 control-label" for="inputError">Email</label> 
     <div class="col-xs-10"> 
      <input type="email" id="inputError" class="form-control" placeholder="Input with error"> 
      <span class="help-block">Please enter a valid email address</span> 

Related Tutorials