I'd suggest exiting the loop early if validation is succesful.  Perhaps add a break statement after this line.