Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure options on validations are passed into errors #232

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JoshDevs
Copy link

This PR ensures that the options that are sent in the validation are passed through to errors.

Custom options being set on a validation should be able to be accessed post validation as they would have been set to indicate a validation has failed for some reason.

Added a test case that checks for this.

@TastyPi
Copy link
Contributor

TastyPi commented Jun 22, 2023

@adzap Hi, this is a minor patch we've made to validates_timeliness. It makes the library more consistent with the standard Rails validators, as they all include **options when adding an error, e.g. PresenceValidator.

We'd like to get this merged upstream so we don't have to maintain our own fork, could you take a look?

@tagliala
Copy link
Contributor

tagliala commented Jan 4, 2024

Hi, I've asked to be added to maintainers so I can keep this library up to date and merge bug fixes like this. Let's maybe wait but at a certain point I'm interested in creating a fork maybe in a new GitHub team to allow multiple admins

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.

None yet

3 participants