Email form to be lowercase

Hai , I’m using the API Connector but i have obstacles, how to make an email form to lowercase. If it’s not lowercase then it can’t submit.

this my backend result, if not forced to use lowercase, chaos will occur.

SashiDo%20Dashboard

this my validation rules.

Capture2

I want, if the user entered an email like this can not be sent.

Capture

Thanks for your help

Hi @devper

You need to add a convert on your variable on the server action.

Form
image

Result
image

Server Action



Hope this helps.

3 Likes

thanks @raymantle for your respone. is it possible without using server side?
because I only use the parse platform for my backend.

So, I’m no expert, but the other way you can do it is like this.(P.S. one of the pros may have the correct approach)

  1. Create a hidden input.

  1. Then set the value of the hidden input to copy the user’s entered value and convert to lower case.

Go to Dynamic Attributes of the hidden input.

image

Select Value

image

Set the value on the input to the value of the original input

image

Then preform your formatting

Then you would pass the hidden input to your backend.

There maybe a better and more correct way, but this is how I would do it.

Ray.

You can set a regex condition in validation rules for the input box. I don’t know the exact regex, but you can easily find one which allows only lowercase text.

Also, you can try using a hidden field which can be set on ‘oninput’ event of actual textbox with the value in lowercase.
That way, when you submit the form, value of hidden field will get submitted instead of the textbox.

Thanks @raymantle its work.
@sid i don’t know how to use regex. can you explain how? Thanks

There should be a pattern rule in validation rules for the input. Try setting up regex pattern in that.
Refer this for a lowercase only pattern: https://stackoverflow.com/questions/14107331/regular-expression-to-only-allow-lower-case-letters
You will have to modify it to allow @ dot and underscore.

Try using https://regexr.com for understanding and building regex patterns.

1 Like

thanks @sid I will try

Hello @devper.

Simply make dynamic event > onkeyup > format the particular input value to lowercase.

1 Like