Comments (1)
Turn off auto_validation on the relationship.
Related, I typically use this monkey-patch (which I don't think will fix your problem exactly but will fix similar problems):
module DataMapper
module Validations
module AutoValidations
# Always skip auto-validations on primary keys, it turns nested saves into a whole world of pain.
def skip_auto_validation_for?(property)
(property.key? && !property.options[:auto_validation]) ||
(property.options.key?(:auto_validation) && !property.options[:auto_validation])
end
end
end
end
from dm-validations.
Related Issues (20)
- save method not catching validations on attr_accessors HOT 14
- Can't swap the value of a unique property between two objects HOT 19
- dm-validations causes lazy-loaded attributes to load one at a time HOT 2
- Isn't validating an association correctly HOT 3
- Email problem on 1.9.3.preview1 HOT 1
- Regexp issue with ruby 1.9.3-preview1 HOT 2
- drop dm-core dependency? HOT 1
- ValidatesUniqueness mismatches the implementation of unique indexes in dm-constraints HOT 1
- validates_with_block is broken when passing in an option hash HOT 3
- Numeric validator precision/scale validation fails for certain floats on MRI 1.9.3 HOT 2
- Patch 1.2.0 to play nicely with Formtastic
- validates_presence_of doesn't expect a space
- Date fields coerces invalid dates into valid dates which then passes validation
- .on() creates an empty array in the errors
- Different error messages for related resource save fails
- email validation doesn't think '[email protected]' is wrong HOT 2
- Unexpected validation failure with decimal properties
- Custom error messages for all inferred validations HOT 2
- Raising exception when saving instead of returning true
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dm-validations.