File tree 2 files changed +8
-6
lines changed
builder/src/pages/builder/auth
frontend-core/src/components
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 79
79
< Heading size= " M" > Reset your password< / Heading>
80
80
< Body size= " M" > Must contain at least 12 characters< / Body>
81
81
< PasswordRepeatInput
82
+ bind: passwordForm= {form}
82
83
bind: password
83
84
bind: error= {passwordError}
84
85
minLength= {$admin .passwordMinLength || 12 }
Original file line number Diff line number Diff line change 1
- <script >
1
+ <script lang = " ts " >
2
2
import { FancyForm , FancyInput } from " @budibase/bbui"
3
3
import { createValidationStore , requiredValidator } from " ../utils/validation"
4
4
5
- export let password
6
- export let error
5
+ export let passwordForm: FancyForm | undefined = undefined
6
+ export let password: string
7
+ export let error: string
7
8
export let minLength = " 12"
8
9
9
- const validatePassword = value => {
10
- if (! value || value .length < minLength) {
10
+ const validatePassword = ( value : string | undefined ) => {
11
+ if (! value || value .length < parseInt ( minLength ) ) {
11
12
return ` Please enter at least ${minLength } characters. We recommend using machine generated or random passwords. `
12
13
}
13
14
return null
35
36
firstPasswordError
36
37
</script >
37
38
38
- <FancyForm >
39
+ <FancyForm bind:this ={ passwordForm } >
39
40
<FancyInput
40
41
label =" Password"
41
42
type =" password"
You can’t perform that action at this time.
0 commit comments