Skip to content
This repository
Browse code

BUGFIX: added validation to the page comment form

Fixes #2782

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@111452 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
commit a584a1f516a56bdf6946e1a6efa9f54bc15e4236 1 parent 6bf7bd1
authored sminnee committed
3  code/sitefeatures/PageCommentInterface.php
@@ -194,8 +194,7 @@ function PostCommentForm() {
194 194
 		$fields->push(new TextareaField("Comment", _t('PageCommentInterface.YOURCOMMENT', "Comments")));
195 195
 		
196 196
 		$form = new PageCommentInterface_Form($this, "PostCommentForm", $fields, new FieldSet(
197  
-			new FormAction("postcomment", _t('PageCommentInterface.POST', 'Post'))
198  
-		));
  197
+			new FormAction("postcomment", _t('PageCommentInterface.POST', 'Post'))), new RequiredFields('Name', 'Comment'));
199 198
 		
200 199
 		// Set it so the user gets redirected back down to the form upon form fail
201 200
 		$form->setRedirectToFormOnValidationError(true);

0 notes on commit a584a1f

Please sign in to comment.
Something went wrong with that request. Please try again.