Request validation

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
olexandersh
Posts: 7
Joined: 22 Oct 2019, 16:43

Request validation

Post by olexandersh » 22 Nov 2019, 11:27

Hello!
How can I use Laravel request validation in admin panel for creating/updating products or users? Is it possible include validation rules for inputs?
Before that I added some custom fields.

olexandersh
Posts: 7
Joined: 22 Oct 2019, 16:43

Re: Request validation

Post by olexandersh » 22 Nov 2019, 13:13

I found to add Validator class and make validation.
But there is another question - how make redirect back with error (redirect()->back() doesn't work)?

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Request validation

Post by aimeos » 23 Nov 2019, 08:28

Which page/component/form do you want to extend? The address in the checkout process?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

olexandersh
Posts: 7
Joined: 22 Oct 2019, 16:43

Re: Request validation

Post by olexandersh » 25 Nov 2019, 08:33

I want to add input to base user's info in admin panel and make validation for this input.

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Request validation

Post by aimeos » 26 Nov 2019, 20:42

If you throw an exception, the form is automatically displayed again:
https://github.com/aimeos/ai-admin-jqad ... #L230-L274
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply