Ich versuche, die folgende Überprüfung auf eine KlasseFehler, wenn ich versuche zu verwenden „.when()“ in Validationrules
ValidationRules
.ensure("disputeAmount").required({ fullMessages: true, message: 'Required' })
.when(a => a.canBeDisputed)
.on(BillItem);
Die erforderlich Validierung funktioniert hinzuzufügen. Aber wenn ich die wenn Klausel hinzufügen, bekomme ich diesen Fehler:
[app-router] Error: (SystemJS) TypeError:
aurelia_validatejs_1.ValidationRules.ensure(...).required(...).when is not a function
Im Folgenden sind die relevanten Elemente aus config.js
"aurelia-validatejs": "npm:[email protected]",
"aurelia-validation": "npm:[email protected]",
"npm:[email protected]": {
"aurelia-metadata": "npm:[email protected]",
"aurelia-validation": "npm:[email protected]",
"validate.js": "npm:[email protected]"
},
"npm:[email protected]": {
"aurelia-binding": "npm:[email protected]",
"aurelia-dependency-injection": "npm:[email protected]",
"aurelia-metadata": "npm:[email protected]",
"aurelia-task-queue": "npm:[email protected]",
"aurelia-templating": "npm:[email protected]"
},
Ist dieses etwas mit der Version von aurelia-Validierung ? Wenn ja, wie aktualisiere ich es? (Das Projekt wird von mir nicht eingerichtet)