mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
BUG: Do not add a default message for numeric and email fields
BUG: Corrected classname to use right object
This commit is contained in:
parent
85c1f52c45
commit
0f647009fa
@ -600,6 +600,10 @@ class UserDefinedForm_Controller extends Page_Controller {
|
||||
|
||||
if($this->Fields()) {
|
||||
foreach($this->Fields() as $field) {
|
||||
if (!in_array($field->ClassName, array('EditableEmailField', 'EditableNumericField'))) {
|
||||
$messages[$field->Name] = $field->getErrorMessage()->HTML();
|
||||
}
|
||||
|
||||
if($field->Required) {
|
||||
$rules[$field->Name] = array_merge(array('required' => true), $field->getValidation());
|
||||
$required->addRequiredField($field->Name);
|
||||
|
Loading…
Reference in New Issue
Block a user