Mandatory field space only input causes error
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- IvanIgniter
- Posts: 58
- Joined: 01 Dec 2021, 07:41
Mandatory field space only input causes error
I am using laravel 6.x, PHP 7.4, Docker desktop/Ubuntu and the Aimeos 2021 (aimeos-laravel: 2021.10.4 / aimeos-core: 2021.10.13)
We are having an issue in the product detail page mandatory field when inputting just a space only will cause error 500 after saving. How can we adjust the code so it won't accept just a space?
We are having an issue in the product detail page mandatory field when inputting just a space only will cause error 500 after saving. How can we adjust the code so it won't accept just a space?
- IvanIgniter
- Posts: 58
- Joined: 01 Dec 2021, 07:41
Re: Mandatory field space only input causes error
Any documentation how does aimeos filter each required field so we could enhanced each field filter needs?
Re: Mandatory field space only input causes error
Currently, Aimeos only checks if the SKU isn't empty and for some invalid characters but not for white spaces:
- https://github.com/aimeos/aimeos-core/b ... d.php#L158
- https://github.com/aimeos/aimeos-core/b ... #L480-L491
Think, we should add spaces too.
- https://github.com/aimeos/aimeos-core/b ... d.php#L158
- https://github.com/aimeos/aimeos-core/b ... #L480-L491
Think, we should add spaces too.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- IvanIgniter
- Posts: 58
- Joined: 01 Dec 2021, 07:41
Re: Mandatory field space only input causes error
Yeah that is my question how to avoid inputting a white space for a mandatory fields?
Is there any solutions?
Is there any solutions?
Re: Mandatory field space only input causes error
Only in dev-master. You can overwrite the JQAdm template for the product detail view and add a regex to the input field that forbids white spaces only:
https://developer.mozilla.org/en-US/doc ... es/pattern
https://developer.mozilla.org/en-US/doc ... es/pattern
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star