Added method to assist in form validation.