Skip to content

Commit

Permalink
fix(component): forms
Browse files Browse the repository at this point in the history
default input message
regex pattern on password input
  • Loading branch information
ygatesoupe committed Jul 4, 2016
1 parent 568b743 commit 017b89f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs-orange/_includes/boostwatch/forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ <h2 id="forms">Forms</h2>
<div class="form-group">
<label class="form-control-label" for="inputDefault">Default input</label>
<input class="form-control" id="inputDefault" type="text">
<span class="form-control-message">This is a hint message</span>
</div>

<div class="form-group">
Expand Down
3 changes: 2 additions & 1 deletion docs-orange/examples/orange-form/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@
<div class="form-group row is-required">
<label for="inputPassword" class="col-sm-3 form-control-label">Password</label>
<div class="col-sm-9">
<input type="password" class="form-control" id="inputPassword" placeholder="password" required="true">
<input type="password" class="form-control" id="inputPassword" placeholder="password" required="true" pattern="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])\w{6,}$">
<span class="form-control-message">Minimum six characters with one lowercase, one uppercase and a number</span>
</div>
</div>
<div class="form-group row is-required">
Expand Down
10 changes: 7 additions & 3 deletions scss/_o-forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
}
}

&.has-danger {
.form-control-message {
.form-control-message {
display: inline-block;
padding: .625rem 0;
font-size: $font-size-sm;
font-weight: bold;
font-weight: normal;
}

&.has-danger {
.form-control-message {
color: $brand-danger;
font-weight: bold;
}
}

Expand Down

0 comments on commit 017b89f

Please sign in to comment.