UNPKG

formvalidatorplus

Version:

This library offers a complete solution for validating, handling, and submitting forms of all complexities. From simple contact forms to intricate multi-step wizards, FormValidatorPlus empowers web developers to streamline the entire process. It handles

67 lines (66 loc) 2.21 kB
/** * If 'is-invalid', 'invalid-feedback' and 'form-control' * class is not defined in your project you can use these * stylesheet. * This are some bootstrap classes so if you are * not using bootstap you can use these classes * rememeber that your every input should have a * form control class (if you are styling your own classes then form control is not needed). * Note: it is not neccessary to use all this classes * and css u can create your own classess * for more details visit */ .form-control:focus{ color:#212529; background-color: #fff; border-color: #86b7fe; outline: 0; box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25); } .form-control { display: block; width: 90%; padding: 0.375rem 0.75rem; font-size: 1rem; font-weight: 400; line-height: 1.5; color: #212529; -webkit-appearance: none; -moz-appearance: none; appearance: none; background-color: #fff; background-clip: padding-box; border: 1px solid #dee2e6; border-radius: 0.375rem; transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; } .form-control.is-invalid { border-color: #dc3545; padding-right: calc(1.5em + 0.75rem); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right calc(0.375em + 0.1875rem) center; background-size: calc(0.75em + 0.375rem); } .form-control.is-invalid:focus{ border-color: #dc3545; box-shadow: 0 0 0 0.25rem rgba(220,53,69,.25); } .invalid-feedback{ margin-top: 12px !important; width: 100%; margin-top: 0.25rem; font-size: 17px; font-weight: 510; color: #dc3848 } @media(max-width:700px){ .form-control.is-invalid{ width: 85% !important; } } @media (prefers-reduced-motion: reduce){ .form-control { transition: none; } }