mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +03:00
Require .form-label classes on form labels (#30476)
This commit is contained in:
@@ -68,7 +68,7 @@ body_class: "bg-light"
|
||||
<form class="needs-validation" novalidate>
|
||||
<div class="row g-3">
|
||||
<div class="col-sm-6">
|
||||
<label for="firstName">First name</label>
|
||||
<label for="firstName" class="form-label">First name</label>
|
||||
<input type="text" class="form-control" id="firstName" placeholder="" value="" required>
|
||||
<div class="invalid-feedback">
|
||||
Valid first name is required.
|
||||
@@ -76,7 +76,7 @@ body_class: "bg-light"
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<label for="lastName">Last name</label>
|
||||
<label for="lastName" class="form-label">Last name</label>
|
||||
<input type="text" class="form-control" id="lastName" placeholder="" value="" required>
|
||||
<div class="invalid-feedback">
|
||||
Valid last name is required.
|
||||
@@ -84,7 +84,7 @@ body_class: "bg-light"
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<label for="username">Username</label>
|
||||
<label for="username" class="form-label">Username</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">@</span>
|
||||
<input type="text" class="form-control" id="username" placeholder="Username" required>
|
||||
@@ -95,7 +95,7 @@ body_class: "bg-light"
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<label for="email">Email <span class="text-muted">(Optional)</span></label>
|
||||
<label for="email" class="form-label">Email <span class="text-muted">(Optional)</span></label>
|
||||
<input type="email" class="form-control" id="email" placeholder="you@example.com">
|
||||
<div class="invalid-feedback">
|
||||
Please enter a valid email address for shipping updates.
|
||||
@@ -103,7 +103,7 @@ body_class: "bg-light"
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<label for="address">Address</label>
|
||||
<label for="address" class="form-label">Address</label>
|
||||
<input type="text" class="form-control" id="address" placeholder="1234 Main St" required>
|
||||
<div class="invalid-feedback">
|
||||
Please enter your shipping address.
|
||||
@@ -111,12 +111,12 @@ body_class: "bg-light"
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<label for="address2">Address 2 <span class="text-muted">(Optional)</span></label>
|
||||
<label for="address2" class="form-label">Address 2 <span class="text-muted">(Optional)</span></label>
|
||||
<input type="text" class="form-control" id="address2" placeholder="Apartment or suite">
|
||||
</div>
|
||||
|
||||
<div class="col-md-5">
|
||||
<label for="country">Country</label>
|
||||
<label for="country" class="form-label">Country</label>
|
||||
<select class="form-select" id="country" required>
|
||||
<option value="">Choose...</option>
|
||||
<option>United States</option>
|
||||
@@ -127,7 +127,7 @@ body_class: "bg-light"
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label for="state">State</label>
|
||||
<label for="state" class="form-label">State</label>
|
||||
<select class="form-select" id="state" required>
|
||||
<option value="">Choose...</option>
|
||||
<option>California</option>
|
||||
@@ -138,7 +138,7 @@ body_class: "bg-light"
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label for="zip">Zip</label>
|
||||
<label for="zip" class="form-label">Zip</label>
|
||||
<input type="text" class="form-control" id="zip" placeholder="" required>
|
||||
<div class="invalid-feedback">
|
||||
Zip code required.
|
||||
@@ -179,7 +179,7 @@ body_class: "bg-light"
|
||||
|
||||
<div class="row gy-3">
|
||||
<div class="col-md-6">
|
||||
<label for="cc-name">Name on card</label>
|
||||
<label for="cc-name" class="form-label">Name on card</label>
|
||||
<input type="text" class="form-control" id="cc-name" placeholder="" required>
|
||||
<small class="text-muted">Full name as displayed on card</small>
|
||||
<div class="invalid-feedback">
|
||||
@@ -188,7 +188,7 @@ body_class: "bg-light"
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label for="cc-number">Credit card number</label>
|
||||
<label for="cc-number" class="form-label">Credit card number</label>
|
||||
<input type="text" class="form-control" id="cc-number" placeholder="" required>
|
||||
<div class="invalid-feedback">
|
||||
Credit card number is required
|
||||
@@ -196,7 +196,7 @@ body_class: "bg-light"
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label for="cc-expiration">Expiration</label>
|
||||
<label for="cc-expiration" class="form-label">Expiration</label>
|
||||
<input type="text" class="form-control" id="cc-expiration" placeholder="" required>
|
||||
<div class="invalid-feedback">
|
||||
Expiration date required
|
||||
@@ -204,7 +204,7 @@ body_class: "bg-light"
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label for="cc-cvv">CVV</label>
|
||||
<label for="cc-cvv" class="form-label">CVV</label>
|
||||
<input type="text" class="form-control" id="cc-cvv" placeholder="" required>
|
||||
<div class="invalid-feedback">
|
||||
Security code required
|
||||
|
||||
@@ -35,7 +35,6 @@ body {
|
||||
left: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-bottom: 0; /* Override default `<label>` margin */
|
||||
color: #495057;
|
||||
pointer-events: none;
|
||||
cursor: text; /* Match the input under the label */
|
||||
|
||||
Reference in New Issue
Block a user