internal override void Validate(ModalDataInputForm form) { if (this.Value.Length < MinLength) { throw new ArgumentException($"The minimum length is {MinLength}"); } if (MaxLength >= 0 && this.Value.Length > MaxLength) { throw new ArgumentException($"The maximum length is {MaxLength}"); } this.Validator?.Invoke(this.Value, form); }
internal override void Validate(ModalDataInputForm form) { if (this.Value < Min) { throw new ArgumentException($"The minimum value is {Max}"); } if (this.Value > Max) { throw new ArgumentException($"The maximum value is {Max}"); } this.Validator?.Invoke(this.Value, form); }
internal abstract void Validate(ModalDataInputForm form);
internal override void Validate(ModalDataInputForm form) { this.Validator?.Invoke(this.Value, form); }