Merge pull request #1738 from ss23/patch-1

Update form-validation.md
This commit is contained in:
Simon Welsh 2013-04-08 23:45:32 -07:00
commit d5b9ce71c3

View File

@ -25,7 +25,7 @@ when the form is submitted.
new RequiredFields(array('MyRequiredField'))
);
// Optional: Add a CSS class for custom styling
$form->dataFieldByName('MyRequiredField)->addExtraClass('required');
$form->dataFieldByName('MyRequiredField')->addExtraClass('required');
return $form;
}
@ -141,4 +141,4 @@ errors.
## Related
* Model Validation with [api:DataObject->validate()]
* Model Validation with [api:DataObject->validate()]