-
Notifications
You must be signed in to change notification settings - Fork 176
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
Why default validity is false? #19
Comments
Hi @zack9433 In this case, Can you give me a DEMO to show the error you mention ? |
I create a sample |
I suppose that you want to validate when initial Here's for your reference: |
No, in my condition, the form has two part, one is default value and the other part is to let user to fill in. I want check validation when user press submit. |
Ok @zack9433 For example you have <!-- contain default value -->
<input type="text" ng-model="model1" validation="something"/>
<!-- let user fill -->
<input type="text" ng-model="model2" validation="other"/> Then you can validate the first model
Just validate the first one in Initial And If you need the Is that your question ? |
The form contains some default and user defined inputs and all inputs I think i will get form validation is
Both condition will get |
Thanks @zack9433 Can you give me a PR on this ? (Coz i need some time to fix this after my other work) unless you can wait check |
Hi @zack9433 I have found your DEMO issue here $scope.submitForm = function(form) {
$scope.result = $validationProvider.checkValid(form);
}
We should use this with the For example $scope.submitForm = function (form) {
$validationProvider.validate(form)
.success(function () {
$scope.result = $validationProvider.checkValid(form);
});
} This will get the real answer. 🍻 |
Thanks @huei90 But i think don't set validity when init is better than set to false. 🍻 |
Ok, i heard your voice =) |
i am facing a strange problem.i am really tired to configure this problem.i see the default value of $valid is false when user fill the form correctly it become true then submit button enable.can any one tell me here how we can set the default value of $valid false instead of true ? |
Hi @zafarullahjoiya Sorry that I didn't mentioned this on the Document. Here's you can change the Initial value of $valid |
HI Huei Tan Thanks for response....i have resolve the issue...The issue was with zafarullahjoiya On Thu, May 7, 2015 at 6:34 PM, Huei Tan [email protected] wrote:
Web Developer |
I think don't set validity to false when initial.
If i set a valid value to input as default value when initialize form and this input valid-method="blur", but i get this form $valid is false.
The text was updated successfully, but these errors were encountered: