All data entered must be valid
All data entered must be valid

The form attribute returns null if control in not within the context of form. Retrieve the form attribute and examine its value.