Comments (7)
You can manually call the validate API by using
this.$validationProvider.validate( form )
from angular-validation.
Ye si know you can call that and i do when the user hits SUBMIT, but that call validates the entire form - causes all inputs on the form to have their validation checked and any associated messages will be fired and shown in the UI.
This is not what I asked:
What I asked, was for was way to validation just a single input:
There is a UX business case with my customer that requires:
That ONLY validation on the effected control, related to the input entered (which now causes that previous entry to be invalid) MUST be shown. All other validation messages not related to that changed input MUST NOT display ANY validation messages.
I know the related fields and i want to trigger the validation to fire on the related input ONLY, not the whole form.
from angular-validation.
yes, you can validate only single one input
<form name="Form">
<input type="text" name="required" ng-model="required" validator="required"/><input type="text" name="required2" ng-model="required2" validator="required"/>
</form>
<script>
// ...
validationProvider.validate($scope.Form.required)
// ...
</script>
from angular-validation.
Sorry but just to be sure,
You can validate a given named input (covered by validation rules)
i.e.
if ( input_needs_validation && form && input_name) {
let input = form[input_name];
validationProvider.validate( input );
}
from angular-validation.
from angular-validation.
OK cool - then we can close this - because that exactly what I need
:)
from angular-validation.
Perfect 👍
from angular-validation.
Related Issues (20)
- npm 1.4.3 package contains file with no name - breaks install HOT 8
- How to set input invalid using controller HOT 3
- Why set webpack as dependencies? HOT 3
- 关于validation-group的疑问 HOT 1
- 如何将错误信息展示在一个容器中并只展示第一个错误的信息? HOT 2
- CheckValid not working as expected HOT 3
- Validators not updating when dependant on other form values HOT 2
- Need to Add equalTo validation as it's required and widely used too. HOT 3
- Required validation is invalid when model value is 0 HOT 2
- validation-submit not work in version1.4.x HOT 3
- I´m getting the error Possibly unhandled rejection: error HOT 3
- validation is working but not showing error message bellow the input feild HOT 7
- 720kb datepicker is not working when we include angular-validation inside it. HOT 5
- how can use with angular ui select HOT 3
- Why add the validator = "required" valid-method = "blur" tag, js can not get ng-model value? HOT 7
- Allow empty string for validator? HOT 1
- [Question] Is there anything similar to this library for Angular 4? HOT 1
- Clear Form after submit shows validation HOT 5
- dynamic elements added to scope does not validate HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-validation.