Added isValidForSubmit method.