mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
exclude validators in readonly mode forms
This commit is contained in:
parent
d39de25fe9
commit
a94e76d45f
@ -120,6 +120,7 @@ export class FormFieldModel extends FormWidgetModel {
|
|||||||
validate(): boolean {
|
validate(): boolean {
|
||||||
this.validationSummary = new ErrorMessageModel();
|
this.validationSummary = new ErrorMessageModel();
|
||||||
|
|
||||||
|
if (!this.readOnly) {
|
||||||
let validators = this.form.fieldValidators || [];
|
let validators = this.form.fieldValidators || [];
|
||||||
for (let validator of validators) {
|
for (let validator of validators) {
|
||||||
if (!validator.validate(this)) {
|
if (!validator.validate(this)) {
|
||||||
@ -127,6 +128,7 @@ export class FormFieldModel extends FormWidgetModel {
|
|||||||
return this._isValid;
|
return this._isValid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this._isValid = true;
|
this._isValid = true;
|
||||||
return this._isValid;
|
return this._isValid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user