mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merged revisions 47401 via svnmerge from
svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq ........ r47401 | ischommer | 2007-12-20 16:21:21 +1300 (Thu, 20 Dec 2007) | 1 line using formfield title (instead of id) for required validation message (on serverside) ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52180 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a9020f477e
commit
770f55e9a5
@ -102,12 +102,13 @@ JS;
|
||||
}
|
||||
if($this->required) {
|
||||
foreach($this->required as $field) {
|
||||
if($fields->dataFieldByName($field) && !$data[$field]) {
|
||||
$fieldObj = $fields->dataFieldByName($field);
|
||||
if($fieldObj && !$data[$field]) {
|
||||
$this->validationError(
|
||||
$field,
|
||||
sprintf(
|
||||
_t('Form.FIELDISREQUIRED'),
|
||||
strip_tags($field)
|
||||
strip_tags($fieldObj->Title())
|
||||
),
|
||||
"required"
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user