Hi Doug (great name, by the way). Since you opted to enforce your
email value's uniqueness via database rules, I'm not sure if the
following blog post is totally relevant to you, but since I recently
had to do the exact same thing that you're describing, thought I'd
take the time to share how I approached and solved it.

http://www.dougboude.com/blog/1/2007/05/Custom-Validation-with-Generic-Commit-a-ModelGlue-Case-Study.cfm

Doug  :0)

On 5/24/07, Doug Arthur <[EMAIL PROTECTED]> wrote:
Hi,

I'm using MG:Unity + Reactor. I'm using a modelglue.GenericCommit and I have
a unique index so the database cannot have multiple email addresses of the
same. How can I get validation to work rather than it throwing a hard error?
Does reactor not catch this in validation? I think it would be nice, if
nothing more to check the SQL error that is thrown back for "Cannot insert
duplicate key". I'm using the validation structure for when users don't
enter a value in a non-null field, or enter an incorrect data type and/or
length.


Thanks,
- Doug
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at:
http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[EMAIL PROTECTED]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to