22427 Posts in 6976 Topics by 2750 members
|Go to End|
3 September 2010 at 8:20pm Last edited: 3 September 2010 8:23pm
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 (must be unique)',
'This roomcode is already in use.',
'Only letters and digits are allowed'
I have followed the example from here. How can i make my DataObject validate this field?
4 September 2010 at 8:17pm
UniqueRestrictedTextField and UniqueTextField are deprecated so you shouldn't rely on its functionality. Having a quick look at UniqueTextField shows that the restricted value lookup looks like its been commented out so you may need to uncomment that and see what that does.
4 September 2010 at 8:40pm
Ah, I've put everything now into validate() but will try to go with AjaxUniqueTextField, which i discovered now
11 September 2010 at 7:06am
AjaxUniqueTextField what then is now the correct function for this?
|Go to Top|