validate method

  1. @override
void validate()
override

Метод проверяет валидность данных

Implementation

@override
void validate() {
  assert(quantity.length <= 8);
  assert(amount.length <= 10);
  assert(price.length <= 10);

  final String? _ean13 = ean13;
  if (_ean13 != null) {
    assert(_ean13.length <= 20);
  }

  final String? _shopCode = shopCode;
  if (_shopCode != null) {
    assert(_shopCode.length <= 64);
  }

  final SupplierInfo? _supplierInfo = supplierInfo;
  if (_supplierInfo != null) {
    assert(agentData?.agentSign != null);
    _supplierInfo.validate();
  }

  agentData?.validate();
}