"required":"Обязательно введите email"
}
},
"password":{
"required":"Обязательно введите пароль",
"minLength":{
"params":6,
"message":"В пароле должно быть больше 6 символов"
}
},
}`
&allowedFields=`email,password`
&formTpl=`@CODE:
<form method="post" class="w-100">
<input type="hidden" name="formid" value="login">
<div class="form-group [+email.errorClass+][+email.requiredClass+]">
<div class="form-floating mb-3 w-100">
<input type="email" class="form-control" id="email" name="email" placeholder="name@example.com" value="[+email.value+]">
<label class="fs-8 mt-1">Email</label>
</div>
[+email.error+]
</div>
<div class="form-group [+password.errorClass+][+password.requiredClass+]">
<div class="form-floating w-100">
<input type="password" class="form-control" id="password" name="password" placeholder="Пароль value=""">
<label class="fs-8 mt-1">Пароль</label>
</div>
[+password.error+]
</div>
<div class="my-4 fs-8">
[+form.messages+]
</div>
<div class="form-group text-center mt-3">
<button type="submit" class="btn btn-danger text-white fw-600 text-uppercase rounded-4 px-4"><i class="icon-user"></i> Войти</button>
</div>
</form>
`
&messagesOuterTpl=`@CODE:<div class="alert alert-danger" role="alert">[+messages+]</div>`
&successTpl=`@CODE:<div>Поздравляем с успешной авторизацией, [+fullname.value+]!</div>`
&errorTpl=`@CODE:<div class="alert alert-danger">[+message+]</div>`
&requiredClass=` has-error`
&errorClass=` has-error`
&requiredClass=` has-error`
!]
Советую ознакомиться: FormLister
Обсуждают сегодня