Form validation

Home/Pages/Form validation

Form validation

SOURCE CODE
    <form class="contact-form comment-form" name="registration">
        <div class="form-row">
            <div class="form-group form-field col-md-6">
                <label for="firstname" class="show-label"> firstname <span class="error">*</span></label>
                <input type="text" name="firstname" class="form-control input-form" id="firstname" placeholder="Your first name"/> 
            </div>
            <div class="form-group form-field col-md-6">
                <label for="lastname" class="show-label"> lastname <span class="error">*</span></label>
                <input type="text" name="lastname" class="form-control input-form" id="lastname" placeholder="Your first name"/> 
            </div>
            <div class="form-group form-field col-md-6">
                <label for="email" class="show-label"> email <span class="error">*</span></label>
                <input type="email" name="email" class="form-control input-form" id="email" placeholder="email"/> 
            </div>
            <div class="form-group textarea col-md-12">
                <label for="message" class="show-label"> send message <span class="error">*</span></label>
                <textarea id="message" name="message" data-required="text" cols="30" row="5" placeholder="write message" class="form-control"> </textarea> 
            </div>
        </div>
    </form>
class reference
class values / description
name= "[value]" Required message: firstname | lastname | email | number | message
class="contact-form" Deafault style class for contact form

Form validation style 2

SOURCE CODE
    <form class="contact-form" name="registrationAlt">
        <div class="form-row">
            <div class="form-group form-field col-md-6">
                <input type="text" name="firstname" class="contact-form__input" placeholder="Your first name"/> 
            </div>
            <div class="form-group form-field col-md-6">
                <input type="text" name="lastname" class="contact-form__input" placeholder="Your first name"/> 
            </div>
            <div class="form-group form-field col-md-6">
                <input type="email" name="email" class="contact-form__input" placeholder="email"/> 
            </div>
            <div class="form-group textarea col-md-12">
                <textarea  name="message" data-required="text" cols="30" row="5" placeholder="write message" class="form-control contact-form__textarea"> </textarea> 
            </div>
        </div>
    </form>
class reference
class values / description
name= "[value]" Required message: firstname | lastname | email | number | message
class="contact-form" Deafault style class for contact form