mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user