Input field problem

I have login Id input field, it should allow space in middle, end, start of the Id but it shouldnt allow space only... How to fix that... That input limit is 100.

For e. g:I type 100 space on that field it's allowed now.

99 spaces 1 number that valid but 100 spaces it's invalid.... How to fix that,.? 

mvp_badge
MVP
Solution

Hi Karthick,

You should just use a Trim() around the result when it's posted, and check whether there's anything remaining. If the result of the Trim() is emtpty, it was all spaces.

Hello, can you give another example, or rephrase what you said, please?
You want the input to not have spaces? You want the spaces to not count to the total of characters?

Space counts to the length, so 99 spaces and 1 number or 100 spaces have the same length.

Thank you, Regards,

Márcio

Right now, 

"   12"-Valid

"12 "- Valid

"    "-Valid



Our requirement is, 

"   12"-Valid

"12 "- Valid

"     "- Invalid

ook thanks, I suppose you are working with reactive(just curiosity)?

So, if you put just spaces, when you click on save or update, whatever, you will check if the input is different from NullTextIdentifier() or " ", if it's different, is ok! if is not, is not ok!

Regards,

Márcio

Hi,

Can you share the properties of Intput Field,

Please check that if you give count for max length property of input ,

Kind Regards,

Right now, 

"   12"-Valid

"12 "- Valid

"    "-Valid



Our requirement is, 

"   12"-Valid

"12 "- Valid

"     "- Invalid


FYI- Max property allow space also



For eg: I give max:10 and type 10 spaces its allowed and validate...i don't want that

I know that it allows space but your requirement wasnt clear,

You can add condition on onchange action action of input field for validation 

Like If(input= " ", false,true)

Kind regards 

mvp_badge
MVP
Solution

Hi Karthick,

You should just use a Trim() around the result when it's posted, and check whether there's anything remaining. If the result of the Trim() is emtpty, it was all spaces.

Hello Karthick 

What Kilian has suggested is correct. Please look into the demo here: https://personal-9qwkrkgl.outsystemscloud.com/ForumHelp/Screen1?_ts=637564291396618876

Are you looking for the same? 


Please use the below action - 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.