js/app.js
// Validates the length of the fields
Validates the length of the fields
Validates the length of the fields
function validateLength(field) {
    if(field.value.length > 0) {
        field.style.borderBottomColor = 'green';
        field.classList.remove('error');
    } else {
        field.style.borderBottomColor = 'red';
        field.classList.add('error');
    }
}
function validateLength ( field ) { if ( field . value . length > 0 ) { field . style . borderBottomColor = 'green' ; field . classList . remove ( 'error' ) ; } else { field . style . borderBottomColor = 'red' ; field . classList . add ( 'error' ) ; } }
Validates the length of the fields
Validates the length of the fields