#Show error field without closing modal in custom action

5 messages · Page 1 of 1 (latest)

old nacelle
#
->form([
Forms\Components\TextInput::make('password')->password()
      ->revealable()
      ->required()])
      ->action(
function (array $data) { self::EnabledTwoFactor($data['password']);})->modalWidth('lg'),```
cinder canopyBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

old nacelle
#

Hello, i want to show the error message without closing the modal how i can

upbeat olive
#

What does enabledTwoFactor do?

old nacelle
#
->revealable()
->required()
->live(onBlur: true)
->rules([fn (): Closure => function (string $attribute, $value, Closure $fail) {
  if (!Hash::check($value, auth()->user()->password)) {$fail('The provided :attribute is incorrect.');}
}])```