-
Notifications
You must be signed in to change notification settings - Fork 51
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
Validation for nested object #23
Comments
I need more context, may you please expand on your circumstance. |
There is a nested object "myData" inside the user object which is directly tied to a $scope, Now I need to assign the name property through textbox with validation, so I simply used this code: But it does not simply validate it, When I remove myData from ng-model i.e assign "name" property directly to the user, Validation works fine, Am I missing something? |
Ok thanks, I'm working on this, I will update you asap |
The problem was that the css selector to display the error message was not escaping a '.' character which was present due to nesting as the implementation assigns the model property as one of the error message element class names. |
I ran into an interesting problem while solving this bug, read about it here and see if you have any thoughts to contribute: escaping special characters in jquery selector using a variable vs literal string |
Have this issue completely been fixed?, Validation now works but the error span is still not showing up. |
yes the issue is fixed. I will send you a short plunker in a few minutes demonstrating a working scenario. |
also i forgot to update the dist folder, so that may be why you are experiencing the same error, I will do this as well now |
Oh, So many thanks |
No problem, everything should work now and here is the plunker demonstrating a nested username property: http://plnkr.co/edit/9msvUd?p=preview |
i'm experiencing some issues updating the npm package. it is now on version 1.1.10 for latest. to get latest: |
it looks like its working now, as long as the version you get from npm is greater than 1.1.5 you are good to go. |
I wonder why validation is not applied on this nested object's name property:
$scope.user = {
myData: {
name:""
}
};
The text was updated successfully, but these errors were encountered: