Comments (3)
also , I know I can config.include_validation = false in initializing file, and define my own validations via
validates_numericality_of :reman_amount_cents, :allow_nil => true, :greater_than_or_equal_to => 0, :less_than_or_equal_to => 1000000, :message => "Only amounts in the range 0 to 10000.00 are allowed."
, but it's seems to be counterintuitve to allow one validation (:allow_nil => true), but not the other. Plus there is a problem with this approach as all error messages get assigned to core_charge_amount_cents rather than virtual attribute core_charge_amount - therefore they won't be displayed on the view ( as simple_form in my case wouldn't know about this erros), however the form won't be submitted until the error is cleared.
( I'm displaying errors in line, not listing all my errors at the top)
from money-rails.
@konung Can you provide a patch for this?
from money-rails.
This has been addressed by #70
from money-rails.
Related Issues (20)
- Passing in a parameter value with thousands separator but without decimal separator results in wrong amount HOT 8
- Display cents symbol HOT 1
- Wrong currency is ignored when not using `_currency` attribute HOT 2
- Support for One Currency / Multiple Cents Columns per Record? HOT 2
- Validation of Currency Types by Name or ISO HOT 2
- Using with_model_currency While Referencing Currency on Associated Record HOT 2
- use future default localization behaviour? HOT 1
- Better documentation for numericality validator HOT 1
- New gem version? HOT 1
- Set inifinite precision flag using configure block HOT 1
- Thousand separator issue in monetized field validation HOT 1
- Your bundle is locked to monetize (1.13.0) from rubygems repository HOT 4
- money_rails:initializer does not appear to work on Rails 7.1 HOT 2
- [FEATURE REQUEST] monetize with_model_rounding_mode HOT 1
- Conversion from price to price_cents using :with_currency is inaccurate for currencies without subunits
- Unable to set `default_currency` to `nil` HOT 1
- ArgumentError if the monetized attribute name contains hyphens
- Feature: allow to configure (or document) `Monetize.expect_whole_subunits`
- Using nested forms with accepts_nested_attributes_for monetize fields don't save HOT 1
- Testing with minitest
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 money-rails.