Add trimming to AddUserModal
This commit is contained in:
parent
95666537b3
commit
8748d4448f
1 changed files with 6 additions and 2 deletions
|
@ -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) {
|
if (email) {
|
||||||
const res = emailValidator(email)
|
const res = emailValidator(email)
|
||||||
if (res === true) {
|
if (res === true) {
|
||||||
|
@ -95,7 +99,7 @@
|
||||||
bind:dropdownValue={input.role}
|
bind:dropdownValue={input.role}
|
||||||
options={Constants.BudibaseRoleOptions}
|
options={Constants.BudibaseRoleOptions}
|
||||||
error={input.error}
|
error={input.error}
|
||||||
on:blur={() => validateInput(input.email, index)}
|
on:blur={() => validateInput(input, index)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
|
|
Loading…
Reference in a new issue