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,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user