mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #854 from Juanitou/patch-3
Update docs/en/howto/simple-contact-form.md
This commit is contained in:
commit
c782e00178
@ -104,6 +104,7 @@ All forms have some basic validation built in – email fields will only let the
|
||||
|
||||
The framework comes with a predefined validator called `[api:RequiredFields]`, which performs the common task of making sure particular fields are filled out. Below is the code to add validation to a contact form:
|
||||
|
||||
:::php
|
||||
public function Form() {
|
||||
// ...
|
||||
$validator = new RequiredFields('Name', 'Message');
|
||||
|
Loading…
Reference in New Issue
Block a user