| Current Path : /var/www/html/llcfapp/public/http/validation/ |
| Current File : /var/www/html/llcfapp/public/http/validation/donor.js |
var form_props = getFormProps('don');
$().ready(function() {
$(form_props.form_id).validate({
rules: {
donor_name: { required: true },
donor_whatsapp: { required: true, cell_num_int: true, notEqualToInput: "#donor_whatsapp_sec" },
donor_whatsapp_sec: { cell_num_int: true, notEqualToInput: "#donor_whatsapp" },
donor_ref_name: { required: true },
},
messages: {
donor_name: { required: "Please enter donor name" },
donor_whatsapp: { required: "Please enter WhatsApp #", cell_num_int: "Invalid WhatsApp #", notEqualToInput: "Cannot be identical to secondary" },
donor_whatsapp_sec: { cell_num_int: "Invalid WhatsApp #", notEqualToInput: "Cannot be identical to primary" },
donor_ref_name:{ required: "Please enter donor reference name" },
},
errorPlacement: function(error, element) {
error.insertBefore(element);
},
});
});