We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Sorry for the delay in making this ticket, been swamped.
Issue: attr_accessor it gives bogus errors
class Foo < SimpleRecord::Base
has_strings :password
attr_accessor :new_password
validates_format_of :new_password, :with => /^[-a-z0-9_+.]+@([-a- z0-9]+.)+[a-z0-9]{2,4}$/i
end
bar = Foo.new bar.new_password = [email protected] bar.valid? #=> false bar.errors #=> {:new_password=>["is invalid"]}
Thanks, Josh
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Sorry for the delay in making this ticket, been swamped.
Issue: attr_accessor it gives bogus errors
class Foo < SimpleRecord::Base
has_strings :password
attr_accessor :new_password
For this example new_passwords must be formated like emails
validates_format_of :new_password, :with => /^[-a-z0-9_+.]+@([-a-
z0-9]+.)+[a-z0-9]{2,4}$/i
Stuff for encrypting and setting password...
end
bar = Foo.new
bar.new_password = [email protected]
bar.valid? #=> false
bar.errors #=> {:new_password=>["is invalid"]}
Thanks,
Josh
The text was updated successfully, but these errors were encountered: