Making the email field in comments required
I'm trying to add validation to the email field of the built in comments module. Specifically to make the email field a required field.
I've modified the "Comments submit form" widget template, by adding the validation fields from the name field to the email field.
<sfFields:TextField ID="nameTextField" runat="server" DisplayMode="Write" CssClass="sfcommentsField" WrapperTag="Li" TabIndex="1"> <ValidatorDefinition Required="true" RequiredViolationMessage="Name cannot be empty!" MessageCssClass="sfError" /> </sfFields:TextField> <sfFields:TextField ID="emailTextField" runat="server" DisplayMode="Write" CssClass="sfcommentsField" WrapperTag="Li" TabIndex="1"> <ValidatorDefinition ExpectedFormat = "EmailAddress" Required="true" RequiredViolationMessage="Email cannot be empty" MessageCssClass="sfError" /> </sfFields:TextField>
This doesn't have any affect on submitting the form.
How can I get the form the validate the email field?