mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
exclude validators in readonly mode forms
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user