(inputArr)
| 30 | |
| 31 | // Check required fields |
| 32 | function checkRequired(inputArr) { |
| 33 | let isRequired = false; |
| 34 | inputArr.forEach(function(input) { |
| 35 | if (input.value.trim() === '') { |
| 36 | showError(input, `${getFieldName(input)} is required`); |
| 37 | isRequired = true; |
| 38 | } else { |
| 39 | showSuccess(input); |
| 40 | } |
| 41 | }); |
| 42 | |
| 43 | return isRequired; |
| 44 | } |
| 45 | |
| 46 | // Check input length |
| 47 | function checkLength(input, min, max) { |
no test coverage detected