mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
exclude validators in readonly mode forms
This commit is contained in:
@@ -120,11 +120,13 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
validate(): boolean {
|
||||
this.validationSummary = new ErrorMessageModel();
|
||||
|
||||
let validators = this.form.fieldValidators || [];
|
||||
for (let validator of validators) {
|
||||
if (!validator.validate(this)) {
|
||||
this._isValid = false;
|
||||
return this._isValid;
|
||||
if (!this.readOnly) {
|
||||
let validators = this.form.fieldValidators || [];
|
||||
for (let validator of validators) {
|
||||
if (!validator.validate(this)) {
|
||||
this._isValid = false;
|
||||
return this._isValid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user