Implement password change function
This commit is contained in:
@ -69,11 +69,8 @@ import type { Ref } from 'vue'
|
||||
import { isIP } from 'is-ip'
|
||||
import isCidr from 'is-cidr'
|
||||
|
||||
import '@shoelace-style/shoelace/dist/components/button/button.js'
|
||||
import '@shoelace-style/shoelace/dist/components/input/input.js'
|
||||
import '@shoelace-style/shoelace/dist/components/icon-button/icon-button.js'
|
||||
import '@shoelace-style/shoelace/dist/components/tag/tag.js'
|
||||
import '@shoelace-style/shoelace/dist/components/textarea/textarea.js'
|
||||
import { setFieldValidation } from '@/api/validation'
|
||||
|
||||
import type { ClientCreate } from '@/client/types.gen'
|
||||
|
||||
const name = ref('')
|
||||
@ -111,12 +108,6 @@ watch(
|
||||
{ immediate: true },
|
||||
)
|
||||
|
||||
function setFieldValidation(field: Ref<HTMLSlInputElement>, errorMessage: string = '') {
|
||||
// Set validation on a field
|
||||
field.value?.setCustomValidity(errorMessage)
|
||||
field.value?.reportValidity()
|
||||
}
|
||||
|
||||
function addPolicy() {
|
||||
if (!sourcePrefix.value) {
|
||||
setFieldValidation(sourceField)
|
||||
|
||||
Reference in New Issue
Block a user