import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
-import { DOMAINS_VALIDATOR, getNotEmptyHosts } from '../form-validators/batch-domains-validators'
+import { splitAndGetNotEmpty, UNIQUE_HOSTS_VALIDATOR } from '../form-validators/host-validators'
@Component({
selector: 'my-batch-domains-modal',
if (!this.action) this.action = $localize`Process domains`
this.buildForm({
- domains: DOMAINS_VALIDATOR
+ hosts: UNIQUE_HOSTS_VALIDATOR
})
}
}
submit () {
- this.domains.emit(
- getNotEmptyHosts(this.form.controls['domains'].value)
- )
+ this.domains.emit(splitAndGetNotEmpty(this.form.controls['hosts'].value))
this.form.reset()
this.hide()
}