Commit 146a5d29 authored by TTS Tran Viet Anh's avatar TTS Tran Viet Anh

update validation

parent 8ca88df6
...@@ -36,7 +36,6 @@ function handleClick(input) { ...@@ -36,7 +36,6 @@ function handleClick(input) {
var name = input.name; var name = input.name;
var number = {{ request('numberOfQuestion') ?? 0 }}; var number = {{ request('numberOfQuestion') ?? 0 }};
var i = number - name; var i = number - name;
console.log(input.value);
if ($("input[name=" + name + "]").is(':checked') && jQuery.inArray(i, array) == -1) { if ($("input[name=" + name + "]").is(':checked') && jQuery.inArray(i, array) == -1) {
countAnswer += 1; countAnswer += 1;
......
...@@ -164,8 +164,7 @@ class="form-control @error('numberOfQuestion') is-invalid @enderror" placeholder ...@@ -164,8 +164,7 @@ class="form-control @error('numberOfQuestion') is-invalid @enderror" placeholder
<script> <script>
$(document).ready(function() { $(document).ready(function() {
var x = $('#numberOfQuestion').val(); if ($('#numberOfQuestion').val() != null) {
if (x != null) {
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: "{{ route('questionForm') }}", url: "{{ route('questionForm') }}",
......
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