kalicr/user-validation (1.0.0)

Published 2026-06-25 21:00:58 +00:00 by kalicr-packages

Installation

{
	"repositories": [{
			"type": "composer",
			"url": ""
		}
	]
}
composer require kalicr/user-validation:1.0.0

About this package

Magento 2 plugins that validate Customer and admin User fields against whitespace-only or invisible Unicode characters.

Kalicr_UserValidation

Plugins that validate Customer and admin User fields against whitespace-only or invisible Unicode characters.

Features

  • Customer validationbeforeSave plugin on Magento\Customer\Model\Customer that rejects firstname, lastname, or email containing only whitespace or invisible Unicode characters.
  • Admin User validationbeforeSave plugin on Magento\User\Model\User that rejects username, firstname, lastname, or email with the same conditions.
  • Throws a Spanish LocalizedException with a clear message when validation fails.
  • Detects invisible characters including U+200E (Left-to-Right Mark), zero-width spaces, and similar.

Installation

Via Composer

composer require kalicr/user-validation:^1.0
bin/magento module:enable Kalicr_UserValidation
bin/magento setup:upgrade

Manual (local debugging only)

Copy the module to app/code/Kalicr/UserValidation, then enable and upgrade.

Configuration

No configuration required. The plugins are always active.

Dependencies

  • Magento: 2.4.8-p4 (Open Source / Adobe Commerce)
  • PHP: ^8.2 || ^8.3
  • Modules: Magento_Customer, Magento_User

Technical Notes

  • Plugins registered in etc/di.xml.
  • Validation uses preg_replace to strip whitespace and invisible Unicode characters, then checks if the result is empty.

Changelog

See CHANGELOG.md.

License

Proprietary KaliCR commercial license. See LICENSE.md.

Support

contacto@kalicr.com

Dependencies

Dependencies

ID Version
magento/framework ^103.0
magento/module-customer ^103.0
magento/module-user ^103.0
php ^8.2 || ^8.3
Details
Composer
2026-06-25 21:00:58 +00:00
1
Kal-i CR Development Team
proprietary
5.3 KiB
Assets (1)
Versions (1) View all
1.0.0 2026-06-25