Professional Documents
Culture Documents
ValidForm Major
ValidForm Major
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Registration Form</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
rel="stylesheet">
</head>
<body>
<h2>Registration Form</h2>
<div class="form-group">
</div>
<div class="form-group">
</div>
<div class="form-group">
</div>
<div class="form-group">
<label for="password">Password</label>
</div>
<div class="form-group">
</div>
</form>
</div>
</div>
</div>
<script>
function validateForm() {
clearErrors();
if (fullName.length < 5) {
isValid = false;
// Validate email
if (!email.includes('@')) {
isValid = false;
isValid = false;
// Validate password
isValid = false;
}
isValid = false;
if (isValid) {
setTimeout(function() {
}, 3000);
return isValid;
document.getElementById(id).textContent = message;
function clearErrors() {
document.getElementById('nameError').textContent = '';
document.getElementById('emailError').textContent = '';
document.getElementById('phoneError').textContent = '';
document.getElementById('passwordError').textContent = '';
document.getElementById('confirmPasswordError').textContent = '';
</script>
</body>
</html>
--------------------------------------------------------------------------------------------------------------------------------------
----
body {
background-image: url(https://wallpapercave.com/wp/wp2506817.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
height:100vh;
.box{
background-color: transparent;
backdrop-filter: blur(3px);
padding:10px;
margin:auto;
width:600px;
height:700px;
transform:translate(5%,25%);
.container {
background-color: #495057;
padding: 30px;
border-radius: 10px;
margin-top: 50px;
.button{
text-align:center;
.form-control {
background-color: #6c757d;
color: #ffffff;
.form-control::placeholder {
color: #adb5bd;
.error {
color: red;
.success-message {
text-align: center;
}
.alert-success {
background-color: #28a745;