Form validation method to access error array