0

Hi thanks, I think I feel better if I return false or true.
So, thinking of the actual function would it be something like this:

public boolean validateOutput(String name, String surname, String age, String sex, String role, String id, String streetNumber, String streetName, String postcode) {
if(fields are empty){
        generateError();
        return false;
    }
else{
    if(not number){
            generateError();
            return false;
        }
    else{
        return true;
    }
}

If the above is OK, I'm thinking that perhaps I could group all the textFields in an array or something so that I can check them all for empty values pretty quickly, what do you reckon?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.