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

validators on non standard (legacy) column names #154

Open
paulccarey opened this issue Jun 2, 2011 · 1 comment
Open

validators on non standard (legacy) column names #154

paulccarey opened this issue Jun 2, 2011 · 1 comment

Comments

@paulccarey
Copy link

Hi

I think this may be a bug (or feature), not sure!

Anyway when specifying validators (not checked all but I presume so) on attributes that do not follow the standard naming schema expected an exception is thrown because the attribute cant be found.

static $validates_uniqueness_of = array(
    array("screenName")
);

There is obviously some sort of translation going on internally so if the validator is specified in normal form it works,

static $validates_uniqueness_of = array(
    array("screenname")
);

I think this should either be documented or the validators should allow and possibly internally translate the specified attributes.

@greut
Copy link
Collaborator

greut commented Jun 3, 2011

Can you write a test case for this? Validations should use the same inflection rules than Column.

I shouldn't be hard to fix that btw, but tests would be great.

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