FilamentF
Filamentβ€’2y ago
Jamie Cee

Custom View Form Validation

I have a route that triggers a view that looks like this:

@php
$livewire = new \App\Http\Livewire\ResetPassword();
@endphp
<div class="fi-simple-layout flex min-h-screen flex-col items-center">
    <div class="fi-simple-main-ctn flex w-full flex-grow items-center justify-center">

        <main
            class="fi-simple-main my-16 w-full bg-white px-6 py-12 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10 sm:rounded-xl sm:px-12 sm:max-w-lg">

            <x-filament-panels::layout.base :livewire="$livewire">

                <x-filament-panels::header.simple :heading="$heading ??= $livewire->getHeading()"
                    :subheading="$subheading ??= $livewire->getSubHeading()" />


                {{-- Content --}}
                <x-filament-panels::form action="{{ route('password.reset.process') }}" method="POST"
                    style="margin-top: 5%;">
                    <input type="hidden" name="_token" value="{{ csrf_token() }}" />
                    <input type="hidden" name="token" value="{{ request()->token }}" />
                    <input type="hidden" name="email" value="{{ request()->query('email') }}" />



                    <x-filament-forms::field-wrapper.label prefix="Password" />
                    <x-filament::input.wrapper>
                        <x-filament::input type="password" name="password" placeholder="Enter Password" id="password" />
                    </x-filament::input.wrapper>

                    <x-filament-forms::field-wrapper.label prefix="Confirm Password" />
                    <x-filament::input.wrapper>
                        <x-filament::input type="password" name="password_confirmation" placeholder="Confirm Password"
                            id="password_confirmation" />
                    </x-filament::input.wrapper>


                    <x-filament::button type="submit" color="primary">
                        Reset Password
                    </x-filament::button>

                </x-filament-panels::form>

            </x-filament-panels::layout.base>
        </main>
    </div>
</div>
Solution
Thank you for your help @toeknee Appreciate it πŸ™‚
Was this page helpful?
Custom View Form Validation - Filament