mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-30 13:19:11 +02:00
Merge pull request #4851 from SilbinaryWolf/remove-validation-from-lookupfield
BUG Resolve issue with readonly LookupField failing validation
This commit is contained in:
commit
b38f316a80
@ -79,6 +79,24 @@ class LookupField extends DropdownField {
|
|||||||
return parent::Field($properties);
|
return parent::Field($properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ignore validation as the field is readonly
|
||||||
|
*
|
||||||
|
* @param Validator $validator
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function validate($validator) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stubbed so invalid data doesn't save into the DB
|
||||||
|
*
|
||||||
|
* @param DataObjectInterface $record DataObject to save data into
|
||||||
|
*/
|
||||||
|
public function saveInto(DataObjectInterface $record) {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return LookupField
|
* @return LookupField
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user