Form validation in Shopware 6 administration

The validation currently pretty sucks. 

Anyway just take a look at mapApiErrors and you get the idea.

https://github.com/shopware/platform/blob/4bdbc9238e57f6cd3e33fc97a16aaa1e5d19d15a/src/Administration/Resources/app/administration/src/app/component/rule/condition-type/sw-condition-line-item-custom-field/index.js#L5

or better mapPropertyErrors  

https://github.com/shopware/platform/blob/87fc9e8cf4cdab0650e0caaf9a8ba12bab2902c2/src/Administration/Resources/app/administration/src/module/sw-customer/component/sw-customer-address-form/index.js

Don’t forget to add a Required flag within your Entity etc.

3 „Gefällt mir“