validation disabled when displaycontrols is false
gitea/salix/master This commit looks good Details

This commit is contained in:
Gerard 2019-03-08 07:58:09 +01:00
parent 0e3d568743
commit 7e7023c680
1 changed files with 2 additions and 1 deletions

View File

@ -52,10 +52,11 @@ export default class InputNumber extends Textfield {
}
validateValue() {
console.log(this.displayControls);
if ((this.validate() !== undefined && !this.validate()) ||
(this.max && this.value > this.max) ||
(this.min && this.value < this.min) ||
(this.step && this.value % this.step != 0))
(this.displayControls && (this.step && this.value % this.step != 0)))
this.$element[0].querySelector('.infix').classList.add('invalid', 'validated');