Model
NoSpaceBeforeAndAfterString
Magento\Inventory\Model\Validators\NoSpaceBeforeAndAfterString
What it does
This validator class checks if a string value contains leading or trailing whitespace characters.
Developers use this when validating inventory-related input fields (like SKUs or source codes) to ensure data consistency and prevent issues caused by accidental spaces at the beginning or end of user-entered values.
Public Methods
- execute()