(input)
| 20 | |
| 21 | // Check email is valid |
| 22 | function checkEmail(input) { |
| 23 | 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,}))$/; |
| 24 | if (re.test(input.value.trim())) { |
| 25 | showSuccess(input); |
| 26 | } else { |
| 27 | showError(input, 'Email is not valid'); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | // Check required fields |
| 32 | function checkRequired(inputArr) { |
no test coverage detected