Knockout-Contrib / Knockout-Contrib/Knockout-Validation
Remote validation and init
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 366
- PR merge metrics
- No merged PRs in 30d
Description
Hey,
i have:
function orderViewModel(data){
var self = this;
this.id = ko.observable(data.id);
this.date = ko.observable(data.date).extend({
remote: {
data: {
'form':'AddOrder',
'field':'date',
'id':self.id()
}
}
});
this.description = ko.observable(data.description).extend({
remote: {
data: {
'form':'AddOrder',
'field':'description',
'id':self.id()
}
}
});
this.status = ko.observable(data.status);
this.isValid = ko.computed(function(){
return ko.validation.group(this);
}, this);
}
but when my app stats, becouse i print list of models, i've got many validation requests in background (it laqqs a lot). i cant find possibility to disable validation during initialization. could someone show me correct way?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the remote validation extender and the orderViewModel initialization shown in the issue; the payload does not name a repository file or test. Reproduce initialization with multiple models and trace why validation requests are sent. Done means initialization avoids unnecessary remote requests while normal validation still works afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100