Added isValidField and validateField tests