<!DOCTYPE html>
<
html
>
<
head
>
<
link
rel
=
"stylesheet"
href
=
crossorigin
=
"anonymous"
>
</
head
>
<
body
class
=
"m-3"
>
<
h1
class
=
"text-success"
> GeeksforGeeks </
h1
>
<
h3
>Bootstrap5 Validation Server side</
h3
>
<
form
class
=
"row g-3"
>
<
section
class
=
"col-md-4"
>
<
label
>First name</
label
>
<
input
type
=
"text"
class
=
"form-control is-valid"
value
=
"Geek"
>
<
section
class
=
"valid-feedback"
>
Please enter your first name
</
section
>
</
section
>
<
section
class
=
"col-md-4"
>
<
label
>Last name</
label
>
<
input
type
=
"text"
class
=
"form-control is-invalid"
>
<
section
class
=
"invalid-feedback"
>
Please enter your last name
</
section
>
</
section
>
<
section
class
=
"col-md-4"
>
<
label
>Username</
label
>
<
section
class
=
"input-group has-validation"
>
<
span
class
=
"input-group-text"
>@</
span
>
<
input
type
=
"text"
class
=
"form-control is-invalid"
>
<
section
class
=
"invalid-feedback"
>
Enter your username.
</
section
>
</
section
>
</
section
>
<
section
class
=
"col-md-4"
>
<
label
>City</
label
>
<
input
type
=
"text"
class
=
"form-control is-invalid"
>
<
section
class
=
"invalid-feedback"
>
Please enter your City name
</
section
>
</
section
>
<
section
class
=
"col-md-3"
>
<
label
>State</
label
>
<
select
class
=
"form-select is-invalid"
>
<
option
selected disabled
value
=
""
>Choose</
option
>
<
option
>bihar</
option
>
<
option
>U.P.</
option
>
<
option
>C.G.</
option
>
</
select
>
<
section
class
=
"invalid-feedback"
>
select a valid state.
</
section
>
</
section
>
<
section
class
=
"col-12"
>
<
section
class
=
"form-check"
>
<
input
class
=
"form-check-input is-invalid"
type
=
"checkbox"
value
=
""
id
=
"name6"
required>
<
label
class
=
"form-check-label"
>
Agree to terms and conditions
</
label
>
<
section
class
=
"invalid-feedback"
>
You must agree before submitting.
</
section
>
</
section
>
</
section
>
<
section
class
=
"col-12"
>
<
button
class
=
"btn btn-primary"
type
=
"submit"
>
Submit form
</
button
>
</
section
>
</
form
>
</
body
>
</
html
>