1
0
Fork 0
mirror of synced 2024-07-15 11:15:59 +12:00

Add trimming to AddUserModal

This commit is contained in:
Rory Powell 2022-09-01 08:40:19 +01:00
parent 95666537b3
commit 8748d4448f

View file

@ -44,7 +44,11 @@
]
}
function validateInput(email, index) {
function validateInput(input, index) {
if (input.email) {
input.email = input.email.trim()
}
const email = input.email
if (email) {
const res = emailValidator(email)
if (res === true) {
@ -95,7 +99,7 @@
bind:dropdownValue={input.role}
options={Constants.BudibaseRoleOptions}
error={input.error}
on:blur={() => validateInput(input.email, index)}
on:blur={() => validateInput(input, index)}
/>
</div>
<div class="icon">