| 88 | } |
| 89 | }); |
| 90 | function 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 | } |
| 100 | function 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); |