We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 006d2ef + 4f2fa65 commit 5c04c2cCopy full SHA for 5c04c2c
app/code/Magento/Ui/view/base/web/js/form/element/region.js
@@ -24,6 +24,7 @@ define([
24
update: function (value) {
25
var country = registry.get(this.parentName + '.' + 'country_id'),
26
options = country.indexedOptions,
27
+ isRegionRequired,
28
option;
29
30
if (!value) {
@@ -43,6 +44,14 @@ define([
43
44
this.validation['required-entry'] = true;
45
}
46
47
+ if (option && !this.options().length) {
48
+ registry.get(this.customName, function (input) {
49
+ isRegionRequired = !!option['is_region_required'];
50
+ input.validation['required-entry'] = isRegionRequired;
51
+ input.required(isRegionRequired);
52
+ });
53
+ }
54
+
55
this.required(!!option['is_region_required']);
56
57
},
0 commit comments