Skip to content

Make messages configurable#108

Open
htuscher wants to merge 1 commit into
achedeuzot:masterfrom
htuscher:master
Open

Make messages configurable#108
htuscher wants to merge 1 commit into
achedeuzot:masterfrom
htuscher:master

Conversation

@htuscher

Copy link
Copy Markdown

I think this was the intention but as you're not passing an atom to Keyword.get, it makes it impossible to override the message.

A gettext integration would be highly appreciated, but for now, this should be sufficient.

@dennym

dennym commented Feb 24, 2025

Copy link
Copy Markdown

You can pass in the option :message into the validate_date/3 and it will be used since the :message atom gets defaulted by message/3 at lib/validators/date.ex#L147. Its a bit unusual and confusing but it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants