Commit 50b8b16b authored by Sneha 's avatar Sneha

chore: add validation & classDropdown in admin_portal form

parent c4bd9e55
This diff is collapsed.
......@@ -150,9 +150,51 @@ $(document).ready(function () {
$('#application-form').validate({
rules: {
school: 'required',//
category: 'required',//
fullName: 'required',//
admissionClass: 'required',//
dateOfBirth: 'required',//
homeAddress: 'required',//
correspondenceAddress: 'required',//
fatherName: 'required',//
fatherEmail: 'required',//
fatherMobile: {
required: true,
regex: /^[0-9]{10}$/,
},//
candidateImage: {
extension: ['jpg', 'png', 'jpeg', 'svg'],
fileSize: 1 * 1024 * 1024,
},
fatherImage: {
extension: ['jpg', 'png', 'jpeg', 'svg'],
fileSize: 1 * 1024 * 1024,
},
formSubmitCheck: 'required',
},
messages: {
school: 'Please select your school',
category: 'Please specify the category',
fullName: 'Please enter your full name',
admissionClass: 'Please specify the class',
dateOfBirth: 'Please enter the date of birth',
homeAddress: 'Please enter the home address',
correspondenceAddress: 'Please enter the correspondence address',
fatherName: "Please enter father's name",
fatherEmail: "Please enter father's email",
fatherMobile: {
required: "Please enter father's phone number",
regex: 'Please enter a valid phone number',
},
candidateImage: {
extension: 'Only jpg, jpeg, png, svg files are allowed.',
fileSize: 'Please upload a file smaller than 1 MB',
},
fatherImage: {
extension: 'Only jpg, jpeg, png, svg files are allowed.',
fileSize: 'Please upload a file smaller than 1 MB',
},
formSubmitCheck: 'Please check this box to submit the form',
},
errorPlacement: function (error, element) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment