What is the best way to account for some events in an input feild?

Nested if statements for checking whether the fields are empty or complying with other parameters

   if (Name != '' && age != '') {
    if(age >= 18)
    alert("Successfully Submitted!"); 

    else
    alert("you must be over 18 :(");
    }

    else
    alert("cant be empty :(");

how do i check for individual fields with multiple parameters and respond accordingly for each event without having to nest a million if statements?