File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,7 +205,10 @@ export default {
205205 ]
206206 }
207207 if (this .isAdminOrDomainAdmin ()) {
208- this .rules .publicdomainsuffix = [{ validator: this .validatePublicDomainSuffix }]
208+ this .rules .publicdomainsuffix = [{
209+ required: true ,
210+ validator: this .validatePublicDomainSuffix
211+ }]
209212 }
210213 this .fetchProviders ()
211214 },
@@ -331,7 +334,7 @@ export default {
331334 validatePublicDomainSuffix (rule , value ) {
332335 const normalized = value? .toLowerCase ().trim ()
333336 if (! normalized) {
334- return Promise .resolve ( )
337+ return Promise .reject ( new Error ( this . $t ( ' message.error.required.input ' )) )
335338 }
336339 if (! FQDN_REGEX .test (normalized)) {
337340 return Promise .reject (new Error (' Invalid domain suffix' ))
Original file line number Diff line number Diff line change @@ -164,7 +164,10 @@ export default {
164164 ]
165165 }
166166 if (this .isAdminOrDomainAdmin ()) {
167- this .rules .publicdomainsuffix = [{ validator: this .validatePublicDomainSuffix }]
167+ this .rules .publicdomainsuffix = [{
168+ required: true ,
169+ validator: this .validatePublicDomainSuffix
170+ }]
168171 }
169172 this .form .name = this .resource .name
170173 this .form .url = this .resource .url
@@ -272,7 +275,7 @@ export default {
272275 validatePublicDomainSuffix (rule , value ) {
273276 const normalized = value? .toLowerCase ().trim ()
274277 if (! normalized) {
275- return Promise .resolve ( )
278+ return Promise .reject ( new Error ( this . $t ( ' message.error.required.input ' )) )
276279 }
277280 if (! FQDN_REGEX .test (normalized)) {
278281 return Promise .reject (new Error (' Invalid domain suffix' ))
You can’t perform that action at this time.
0 commit comments