Validation didn't work
It's a simple ->gt() validation but I can't seem to make it work.. I can't figure out why. Please help. thanks.
I also tried custome rules but it still wont work.
5 Replies
if you used custom view
you need call validate method
public function submit(): void
{
//Custom view needd call this method
$this->form->validate();
$input = $this->data; ..... }
$input = $this->data; ..... }
thanks a lot for the response @Ngannv !
My code is formatted like this:
Can you suggest where should I put the ->validate()? it would make error when I put
or
as well as
but the way, the form here is not used to save something to the server. i just used it to make a bit of complex query to the table.
Hello @Ngannv !
Maybe you have some idea.
is not working.
while
validation works with error message when the condition is false (max is less than min). but if the condition true (max is greater than min), it would throw an error:
Typed property App\Livewire\Domaintable::$table must not be accessed before initialization
This is my concept
Php Filament CustomPage
https://vhelper.pro/share/Zvt639wM4
And View:
<x-filament-panels::page>
<x-filament-panels::form autocomplete="off" wire:submit="submit">
{{ $this->form }}
</x-filament-panels::form>
</x-filament-panels::page>
Form validate with custom page
Our feature-rich tool offers quick text entry, saving, and link generation, making it the perfect alternative to pastebin for effortless sharing with others
Thank you so much for your time @Ngannv !
I really can't make that code work. Maybe there's something wrong with my code formatting. Is it okey to combine form and table in one component? maybe this is the one causing the problem. Here's the simplified version of my code:
https://vhelper.pro/share/pGX641H2L
Form validate with custom page
Our feature-rich tool offers quick text entry, saving, and link generation, making it the perfect alternative to pastebin for effortless sharing with others