parent
59fe147863
commit
e705a23b74
|
@ -79,6 +79,7 @@
|
||||||
<Heading size="M">Reset your password</Heading>
|
<Heading size="M">Reset your password</Heading>
|
||||||
<Body size="M">Must contain at least 12 characters</Body>
|
<Body size="M">Must contain at least 12 characters</Body>
|
||||||
<PasswordRepeatInput
|
<PasswordRepeatInput
|
||||||
|
bind:passwordForm={form}
|
||||||
bind:password
|
bind:password
|
||||||
bind:error={passwordError}
|
bind:error={passwordError}
|
||||||
minLength={$admin.passwordMinLength || 12}
|
minLength={$admin.passwordMinLength || 12}
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
<script>
|
<script lang="ts">
|
||||||
import { FancyForm, FancyInput } from "@budibase/bbui"
|
import { FancyForm, FancyInput } from "@budibase/bbui"
|
||||||
import { createValidationStore, requiredValidator } from "../utils/validation"
|
import { createValidationStore, requiredValidator } from "../utils/validation"
|
||||||
|
|
||||||
export let password
|
export let passwordForm: FancyForm | undefined = undefined
|
||||||
export let error
|
export let password: string
|
||||||
|
export let error: string
|
||||||
export let minLength = "12"
|
export let minLength = "12"
|
||||||
|
|
||||||
const validatePassword = value => {
|
const validatePassword = (value: string | undefined) => {
|
||||||
if (!value || value.length < minLength) {
|
if (!value || value.length < parseInt(minLength)) {
|
||||||
return `Please enter at least ${minLength} characters. We recommend using machine generated or random passwords.`
|
return `Please enter at least ${minLength} characters. We recommend using machine generated or random passwords.`
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
|
@ -35,7 +36,7 @@
|
||||||
firstPasswordError
|
firstPasswordError
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<FancyForm>
|
<FancyForm bind:this={passwordForm}>
|
||||||
<FancyInput
|
<FancyInput
|
||||||
label="Password"
|
label="Password"
|
||||||
type="password"
|
type="password"
|
||||||
|
|
Loading…
Reference in New Issue