https://jqueryvalidation.org/



// form validation


  $( "#regform" ).validate({


    rules: {

    fname: "required",

     lname: "required",

     email:{

      required:true,

      email:true,

     },

     zipcode: {

      required: true,

      number: true,

    },

    myselect: { required: true }

      

    },


    messages:{

      fname  :"* Please enter your first name",

      lname:"* Please enter your last name",

      email:{

        required:"* Please enter your email",

        email:"* lease enter valid email",

      },

      zipcode:{

        required:"* Please enter your Zip Code",

        number:"* Character not allowed",

      }

    },



  });

  

  $( "#doctorform" ).validate({

  rules: {

    dname: "required",

     hname: "required",

     address:"required",

     phone: {

      required: true,

      number: true,

       minlength: 10,

    }

    },

    messages:{

      dname  :"* please enter your name",

      hname:"* please enter Hospital name",

      address:"* Please enter Address",

     

      phone:{

        required:"* Please enter Phone nummber",

        number:"* Character not allowed",

        minlength:"* Phone number minimum 10 digit",

      }

    },



  });