error property

E? error

Implementation

E? get error {
  final res = validate(value);
  return res.isError() ? res.error as E : null;
}