Skip to content

Differentiating between blank and not_a_date #62

Description

@CeeBeeUK

Hello,

I'm trying to set up date validation on a field that requires a valid date be input.

validates :dob, date: true, presence: true renders both the blank and not_a_date messages.

I am working on a fork that would change the functionality so that passing:

  • nil to validates :dob, date: true would return en.errors.messages.blank
  • 'bob' to validates :dob, date: true would return en.errors.messages.not_a_date

Is this something that would be welcomed as a pull request or should I keep it separate?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions