MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / checkRequired

Function checkRequired

assets/js/student.js:90–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 }
89});
90function checkRequired() {
91 if ($('input[type=checkbox]:checked').length > 0) { // the "> 0" part is unnecessary, actually
92 $('input[type=checkbox]').prop('required', false);
93 $('#check-feed').css('display','none');
94 } else {
95 $('input[type=checkbox]').prop('required', true);
96 $('#check-feed').css('display','block');
97 }
98
99}
100function validateEmail(email) {
101 const re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
102 return re.test(email);

Callers

nothing calls this directly

Calls 1

$Function · 0.70

Tested by

no test coverage detected