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

Fail validation on raw input #161

Closed
AminArria opened this issue Apr 4, 2017 · 1 comment
Closed

Fail validation on raw input #161

AminArria opened this issue Apr 4, 2017 · 1 comment

Comments

@AminArria
Copy link

I wonder if it's possible to validate the raw input format without using another attribute.

This is because I wish to show an error when the raw input contains letters.

@joost
Copy link
Owner

joost commented Apr 6, 2017

I guess you could use the validators directly.

  • presence validation using ActiveModel::Validations::PresenceValidator
  • format validation using ActiveModel::Validations::FormatValidator

@joost joost closed this as completed Apr 6, 2017
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

No branches or pull requests

2 participants