-
Notifications
You must be signed in to change notification settings - Fork 123
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
Naming property Length and using IsNumber isn't valid #167
Comments
Hi, The problem is due to the Thanks for raising this defect. |
I agree that it is not an optimal name 😄 I think the proposed change is great though, it will enable the developer to be informed and change the name to a more suitable one. As I did for my project. Thanks for the prompt reply! |
The name is as good as any other, it's just EA which failed to handle it. This one is able to handle your original naming as expected - without any warnings and changes at your side. With this fix, only the essential set of methods, actually used in expression, is registered within model context. Previously all available methods were added to the context - hence bigger chance to have naming conflicts. Finally, if naming conflict with some method actually occurs, e.g. in expression like |
If I name a property Length, and then use IsNumber inside AssertThat on it, like this:
https://github.com/fehrm/LengthEA/blob/d9839bdb3e70723c236b9cbadec97680348c4853/LengthEA/Models/TestViewModel.cs#L11-L12
It doesn't validate it correctly in the clientvalidation when validated. If I rename the property to eg. LengthT it works.
I added a sample project to my github, https://github.com/fehrm/LengthEA/ with a very simple testcase for it. It behaves the same if I don't use input type number.
This is using EA 2.9.2, jQuery valid 1.16.0 etc. Here is a link to the packages.config
The text was updated successfully, but these errors were encountered: