Hi,
I would like to check if a certain record already exist before adding it in the table. Show meaningful error message
to the user too if it failes. I am using DataObject and ModelAdmin to manage those tables.
class Country extends DataObject {
static $db = array('CountryName');
....
//check if country exist before saving
....
}
Is there anyone who would like to share some idea how to accomplish this?
Thanks!
Posted to: DataObject validation for duplicate record | Show Thread | Post Reply