silverstripe/sapphire — pull request #1740 by svandragt (2013-04-09 14:01:14+00:00)
Title: BUG: Added setExcludedID() to exclude a certain record from uniqueness checking.

As per issue #1399.

This pull request allows end-users to edit records that contain AjaxUniqueTextFields. Prior to this validation always fails when saving and updated record when AjaxUniqueTextFields are not updated. This is because the validation find the current record in the database.

With the patch, developers can use the new $ajaxutf->setExcludedID($this->ID) to exclude the current record from the uniqueness check.