Hello,
I am using SS 2.4.1 and use an UniqueRestrictedTextField inside getCMSFields_forPopup. Although its values are saved, they are not validated and not checked for uniqueness.
$code = new UniqueRestrictedTextField(
'Roomcode',
'Roomcode (must be unique)',
'Room',
'This roomcode is already in use.',
'[A-Z0-9]{10}',
'-',
'Only letters and digits are allowed'
);
I have followed the example from here. How can i make my DataObject validate this field?