How would you handle regex type constraints? Or custom validation?
How would you handle different constraints across various databases?

I agree that uniqueness and presence (along with others) should be
handled database side but not every database can handles all the
validations you may want to perform on a model. At least to my
knowledge.

-Jeremy

On Jan 14, 5:57 pm, David Lee <[EMAIL PROTECTED]> wrote:
> I wish validations were tightly integrated into the database.
> Validations are something that ActiveRecord was not good at.
>
> For example, validating uniqueness or presence of an associated object
> would actually not enforce validation (under rare race conditions).
> This is because it is impossible for Ruby to do constraints for
> databases.
>
> The proper way to validate would be to add constraints into the
> database itself.
>
> Thus, I propose that we have a constraint-error-parsing validation
> system.
> All validations would be defined in the migrations as constraints, and
> the validation system would check for error messages AFTER the
> database call.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to