Skip to content

Commit

Permalink
Fix invalidate parameter word error
Browse files Browse the repository at this point in the history
  • Loading branch information
tungbq authored May 15, 2023
1 parent 93507c0 commit ab3b8f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/form_builder_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class FormBuilderFieldState<F extends FormBuilderField<T>, T>

/// Invalidate field with a [errorText]
///
/// Focus field if [shoudlFocus] is `true`.
/// Focus field if [shouldFocus] is `true`.
/// By default `true`
///
/// Auto scroll when focus invalid if [shouldAutoScrollWhenFocus] is `true`.
Expand All @@ -265,15 +265,15 @@ class FormBuilderFieldState<F extends FormBuilderField<T>, T>
/// not because [shouldAutoScrollWhenFocus] is `true`.
void invalidate(
String errorText, {
bool shoudlFocus = true,
bool shouldFocus = true,
bool shouldAutoScrollWhenFocus = false,
}) {
setState(() => _customErrorText = errorText);

validate(
clearCustomError: false,
autoScrollWhenFocusOnInvalid: shouldAutoScrollWhenFocus,
focusOnInvalid: shoudlFocus,
focusOnInvalid: shouldFocus,
);
}

Expand Down

0 comments on commit ab3b8f7

Please sign in to comment.