validate method
Метод проверяет валидность данных
Implementation
@override
void validate() {
assert(paymentId.length <= 20);
assert(rebillId.length <= 20);
final bool? _sendEmail = sendEmail;
final String? _infoEmail = infoEmail;
if (_sendEmail == true) {
final bool match =
RegExp(r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$')
.hasMatch(_infoEmail ?? '');
assert(_infoEmail != null && _infoEmail.length <= 100 && match);
}
final String? _ip = ip;
if (_ip != null) {
assert(_ip.length >= 7 && _ip.length <= 45);
}
}