Привет, я работал с проверкой формы jquery, Здесь я получил вышеупомянутую ошибку, Есть ли какое-либо решение.
Uncaught Ошибка: Использование неопределенного валидатора "validate_id =".Может быть, вы забыли загрузить модуль, которому принадлежит «validate_id =»?
$.validate({
form: '.attendance_setup_form',
inputParentClassOnError: 'has-danger',
validateOnBlur: false,
onError : function($form) {
return false;
},
onSuccess : function($form) {
add();
// return false;
}
});
<form id="attendance_setup_form" class="attendance_setup_form" name="attendance_setup_form">
<div class="alert_container hidden">
<div class="append_error">
</div>
</div>
<div>
<div class="back_to_link_container">
<a href="{{url('/setup/attendance/shift')}}" class="back_to_link">
<span><img src="{{asset('images/peopledesk_2_0/icon_pagenavigation.svg')}}" alert="back"></span>
<span>Back to Setup</span>
</a>
</div>
<div class="add_sect_box">
<div class="box_headings">
<h4 class="add_part_head">Setup shift</h4>
<p>Create a new shift to assign to role groups</p>
</div>
<div class="row">
<div class="col-md-6 pad_tl25">
<div class="box_form">
</div>
</div>
</div>
<div class="append_content">
<div class="row append_session 0">
<div class="col-md-10 session_sect">
<div class="box_form">
<div>
<div class="form-group">
<label class="input_label">What's the name of the shift?</label><span class="star_symbol">*</span>
<input type="text" name = "shift_name" class="form-control input_he" placeholder="Enter shift name" data-validation="required length custom" data-validation-length="3-20" maxlength="20" data-validation-regexp="^([a-zA-Z0-9 ]+)$" data-validation-error-msg-custom="The input value must be alphanumerics"/>
</div>
<div class="form-group hidden">
<div class="session_text">Session 1:</div>
<div><input type="text" class="form-control w_63 alias_name in_blk input_he" placeholder="Session Alias Name" name="alias_name" data-validation="length custom" data-validation-length="3-20" maxlength="20" data-validation-regexp="^([a-zA-Z0-9 ]+)$" data-validation-error-msg-custom="The input value must be alphanumerics" data-validation-optional='true'></div>
<!-- <span class="delete_session" data-i="0">Delete this session</span> --></div>
<div class="form-group">
<label class="input_label">Check In Time</label><span class="star_symbol">*</span>
<div class="po_r w_53">
<div class="time_select_new mar_r5 ml_0_strict"><i class="fa fa-caret-down select_drop" aria-hidden="true"></i>
<select class="form-control input_he checkin_select_hour 0" data-i="0" name="start_time_1[]" data-validation="required" id="attendance_selectcheckinhour">
<option value="">Select a hour</option>
<?php
for ($loop = 0; $loop <= 23;$loop++) {
$value = sprintf("%02d", $loop);
echo '<option value="'.$value.'">'.$value.'</option>';
}
?>
</select>
</div><span class="colon"> : </span>
<div class="time_select_new mar_l5"><i class="fa fa-caret-down select_drop" aria-hidden="true"></i>
<select class="form-control input_he checkin_select_minute 0" data-i="0" name="start_time_2[]" data-validation="required" id="attendance_selectcheckinmin">
<option value="">Select a minute</option>
<?php
for ($loop = 0; $loop <= 59;$loop++) {
$value = sprintf("%02d", $loop);
echo '<option value="'.$value.'">'.$value.'</option>';
}
?>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="input_label">Check Out Time</label><span class="star_symbol">*</span>
<div class="po_r w_53">
<div class="time_select_new mar_r5 ml_0_strict"><i class="fa fa-caret-down select_drop" aria-hidden="true"></i>
<select class="form-control input_he checkout_select_hour 0" data-i="0" name="end_time_1[]" data-validation="required" id="attendance_selectcheckouthour">
<option value="">Select a hour</option>
<?php
for ($loop = 0; $loop <= 23;$loop++) {
$value = sprintf("%02d", $loop);
echo '<option value="'.$value.'">'.$value.'</option>';
}
?>
</select>
</div><span class="colon"> </span>
<div class="time_select_new mar_l5"><i class="fa fa-caret-down select_drop" aria-hidden="true"></i>
<select class="form-control input_he checkout_select_minute 0" data-i="0" name="end_time_2[]" data-validation="required" id="attendance_selectcheckoutmin">
<option value="">Select a minute</option>
<?php
for ($loop = 0; $loop <= 59;$loop++) {
$value = sprintf("%02d", $loop);
echo '<option value="'.$value.'">'.$value.'</option>';
}
?>
</select>
</div>
</div>
</div>
<div class="err_msg session_01"></div>
</div>
<div class="row">
<div class="col-md-6 reduce_left_space_15">
<div class="form-group box_form_content" id="yes_no_radio_group">
<label class="form-control-label">Should the user Check In manually (via app)?</label>
<div class="">
<div class="radio-group yes_no_radio checkin_manual">
<input autocomplete="off" class="checkin" type="radio" id="attendance_yescheckin_ie1000" name="check_in_flag" value="1" data-validation="required" data-validation-error-msg-container="#yes_no_radio_group" checked="checked">
<label for="attendance_yescheckin_ie1000" class="">Yes</label>
<input autocomplete="off" type="radio" id="attendance_nocheckin_ie1000" class="" name="check_in_flag" value="0" data-validation="required" data-validation-error-msg-container="#yes_no_radio_group">
<label for="attendance_nocheckin_ie1000" class="">No</label>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group box_form_content" id="yes_no_radio_group">
<div class="">
<div class="form-group selfie_box">
<label class="selfie_label" for="attendance_selfiecheckin_ie1000">Take a Selfie while Check In</label>
<label class="switch ver_text">
<input type="checkbox" name = "check_in_selfie_flag" value = "1" class="check_in_selfie_flag" id="attendance_selfiecheckin_ie1000"> <span class="slider round"></span> </label>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 reduce_left_space_15">
<div class="form-group box_form_content " id="yes_no_radio_group">
<label class="form-control-label">Should the user Check Out manually (via app)?</label>
<div class="">
<div class="radio-group yes_no_radio checkout_manual">
<input autocomplete="off" class="checkout" data-i="0" checked type="radio" id="attendance_yescheckout_ie1000" name="check_out_flag" value="1" data-validation="required" data-validation-error-msg-container="#attendance_checkout_ie1000">
<label for="attendance_yescheckout_ie1000" class="">Yes</label>
<input autocomplete="off" type="radio" id="attendance_nocheckout_ie1000" class="checkout" data-i="0" name="check_out_flag" value="0" data-validation="required" data-validation-error-msg-container="#attendance_checkout_ie1000">
<label for="attendance_nocheckout_ie1000" class="">No</label>
</div>
<div id="attendance_checkout_ie1000"></div>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group box_form_content" id="yes_no_radio_group">
<div class="">
<div class="form-group selfie_box selfie_checkout0">
<label class="selfie_label" for="attendance_selfiecheckout_ie1000">Take a Selfie while Check Out</label>
<label class="switch ver_text">
<input type="checkbox" value = "1" name = "check_out_selfie_flag" class="check_out_selfie_flag" id="attendance_selfiecheckout_ie1000"> <span class="slider round" ></span> </label>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<div class="form-group box_form_content" id="yes_no_radio_group">
<label class="form-control-label">Do you want the check in to be approved for this session?</label><span class="star_symbol">*</span>
<div class="w_48">
<div class="radio-group yes_no_radio checkin_approval">
<input autocomplete="off" class="" type="radio" id="attendance_yesapprovalcheckin_ie1000" name="check_in_approval_flag" value="1" data-validation="required" data-validation-error-msg-container="#attendance_approvalcheckin_ie1000" checked>
<label for="attendance_yesapprovalcheckin_ie1000" class="">Yes</label>
<input autocomplete="off" type="radio" id="attendance_noapprovalcheckin_ie1000" class="" name="check_in_approval_flag" value="0" data-validation="required" data-validation-error-msg-container="#attendance_approvalcheckin_ie1000">
<label for="attendance_noapprovalcheckin_ie1000" class="">No</label>
</div>
<div id="attendance_approvalcheckin_ie1000"></div>
</div>
<div class="clearfix"></div>
</div>
<div class="form-group box_form_content selfie_checkout_approval0 " id="yes_no_radio_group">
<label class="form-control-label">Do you want the check out to be approved for this session?</label><span class="star_symbol">*</span>
<div class="w_48">
<div class="radio-group yes_no_radio checkout_approval">
<input autocomplete="off" class="" type="radio" id="attendance_yesapprovalcheckout_ie1000" name="check_out_approval_flag" value="1" data-validation="required" data-validation-error-msg-container="#attendance_approvalcheckout_ie1000" checked>
<label for="attendance_yesapprovalcheckout_ie1000" class="">Yes</label>
<input autocomplete="off" type="radio" id="attendance_noapprovalcheckout_ie1000" class="" name="check_out_approval_flag" value="0" data-validation="required" data-validation-error-msg-container="#attendance_approvalcheckout_ie1000">
<label for="attendance_noapprovalcheckout_ie1000" class="">No</label>
</div>
<div id="attendance_approvalcheckout_ie1000"></div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-md-4 pad_l25">
<div class="box_form">
<div class="form-group">
<label class="input_label">Total time at work:</label>
<div class="sessions">
<div class="ind_session 0"><span class="total_ind_session_tx">session 1 </span><span> = </span><span class="ind_sess_time0 added_time"></span></div>
</div>
</div>
</div>
</div>
</div>-->
<div class="form-group new_sessions">
</div>
<div class="mar_15">
<button class="btn blue_btn ml_10" type="submit" id="attendance_save_100189">Save the Shift Setup</button>
</div>
<div class="add_new_session activity_process_list ml_10">
<p class="ml_10">+ Add new Session</p>
</div>
</div>
</div>
</form>