Yii2 email validation for international domain names

How to enable Yii2 international domain validation, by default it's disabled for domain names that contains special characters like: 'ā, č, ī', etc.. So all email validation won't work, for example if you will try to validate email: [email protected]örtliches.de, but after enabling: enableIDN it will validate it and person with domain name: [email protected]örtliches.de will be able to register.

Interesting issue i came upon few days ago, unit test's show's everything, but wondering why it's not enabled by default.

Yii2 IDN validation rule

[['email'], 'email', 'enableIDN' => true],

Resources:

https://www.yiiframework.com/doc/api/2.0/yii-validators-emailvalidator

yiisoft/yii2
Yii 2: The Fast, Secure and Professional PHP Framework - yiisoft/yii2
yiisoft/yii2
Yii 2: The Fast, Secure and Professional PHP Framework - yiisoft/yii2
Show Comments