fix(form): add nullable validator on boolean value
This commit is contained in:
parent
141f15b444
commit
9ebe8e21dc
@ -22,11 +22,11 @@ import 'package:wyatt_form_bloc/src/domain/input_validators/form_input_validator
|
||||
/// {@endtemplate}
|
||||
class Boolean extends NullableValidator<bool, ValidationStandardError> {
|
||||
/// {@macro boolean}
|
||||
const Boolean.pure({bool? defaultValue = false})
|
||||
: super.pure(defaultValue ?? false);
|
||||
const Boolean.pure({bool defaultValue = false})
|
||||
: super.pure(defaultValue);
|
||||
|
||||
/// {@macro boolean}
|
||||
const Boolean.dirty({bool value = false}) : super.dirty(value);
|
||||
const Boolean.dirty({bool? value}) : super.dirty(value);
|
||||
|
||||
@override
|
||||
ValidationStandardError get onNull => ValidationStandardError.invalid;
|
||||
|
@ -35,7 +35,6 @@ class FormInput<
|
||||
FormInput(
|
||||
this.key,
|
||||
this.validator, {
|
||||
// ignore: avoid_redundant_argument_values
|
||||
FormInputMetadata<Extra>? metadata,
|
||||
}) {
|
||||
this.metadata = metadata ?? FormInputMetadata<Extra>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user