updates AddUserModal to use new validator
This commit is contained in:
parent
cd2b5128f5
commit
5add018eea
|
@ -1,11 +1,13 @@
|
||||||
<script>
|
<script>
|
||||||
import { Body, Input, Select, ModalContent } from "@budibase/bbui"
|
import { Body, Input, Select, ModalContent } from "@budibase/bbui"
|
||||||
|
import { createValidationStore, emailValidator } from "helpers/validation"
|
||||||
|
|
||||||
export let options
|
export let options
|
||||||
export let selected
|
export let selected
|
||||||
export let email = ""
|
|
||||||
export let onConfirm
|
export let onConfirm
|
||||||
export let disabled
|
export let disabled
|
||||||
|
|
||||||
|
const [email, emailError] = createValidationStore("", emailValidator)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ModalContent
|
<ModalContent
|
||||||
|
@ -30,7 +32,8 @@
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
type="email"
|
type="email"
|
||||||
bind:value={email}
|
bind:value={$email}
|
||||||
|
error={$emailError}
|
||||||
placeholder="john@doe.com"
|
placeholder="john@doe.com"
|
||||||
label="Email"
|
label="Email"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue