no validation on blank text field

Ben Lam

New Member
I have two page session. On page 0 I have username as a text field and a next button that goes to page 1. Page 1 collects additional info, has the submit button, as well as a 'back' button that goes back to page 0. I have set the goto control ID of the submit button to stay on page 1 after a submit. I have unchecked 'clear on submit' for username because most likely the username will be the same for additional times user submits.

What I have discovered is that if user goes back to page 0 and changes the username to blank, TP will continue using the previous username. I expect a blank username will fail TP validation of length minimum 0. How can I make this the case?

Thanks,
Ben
 

OliverR

Member
This seems very odd to me. There is no reason why the application would continue using a previously entered value. Are you sure the user is actually confirming the new "blank" username by pressing ENTER while in the username field?

To prevent people from using blank usernames you would want to set the minimum length to 1. Setting the minimum validation values to 0 just disables validation, if I'm not mistaken.
 

Ben Lam

New Member
Thanks Oliver,

I tried both clearing (selecting the text then hitting delete) the username field and clearing the username field and hitting ENTER with same result.

Validation was set to min. length 1 but not working.

I have created a simplified project with this issue and steps to reproduce below. Will submit to support. I may be doing something wrong but have no idea what it is.

Desktop 9.2.0.1388 project: https://we.tl/7eRnMAk8ii

Steps to reproduce issue:

Record One

Pg 1:
1. Enter username: 'abc'
2. Click NEXT

Pg 2:
1. Enter input: '001'
2. Click SUBMIT

Record Two - Cleared username (selecting the text then hitting delete)

Pg 1:
1. Select 'abc' and hit delete
2. Click NEXT

Pg 2:
1. Enter input: '002'
2. Click SUBMIT

Record Three- Cleared username with ENTER

Pg 1:
1. Tap username field and hit ENTER
2. Click NEXT

Pg 2:
1. Enter input: '003'
2. Click SUBMIT

Session 1 View Data

Username - Input
abc - 001
abc - 002
abc - 003

I expect to see rows 2 and three not to be there b/c username field was blank but validation didn't happen
 

OliverR

Member
I downloaded and loaded your application and can confirm this behaviour. I did notice that you have set the validation for 'username' to a minimum length of 1 but a maximum length of 0. My first thought was that this was causing problems - if you specify a minimum length for a field I would generally also specify a maximum length, but I don't know if this is really a problem. In any case, even when I changed it to another value (eg. 9) the problem still remained, ie. records would submit with an empty username (should not be possible), and they would show up in View Data with the username 'abc' (which also should not happen).

The validation did work if I entered a value that exceeded the maximum length, though. It just seems to ignore blank data when you've clearly not told it to do that. The part that really confuses me, though, is that those records then show up with the username you entered for the prior record; that baffles me.

I can't see anything wrong with any other settings so I would like to see one of the developers having a look at this and see what they can find out.
 

Ben Lam

New Member
Thanks for confirming Oliver. It's appreciated, as I'm learning TP it's hard for me to figure out if I'm doing something wrong or if maybe there's a bug with TP or ?
 

Joseph Kraebel

Administrator
Staff member
Hi Ben,

I believe we addressed this in a ticket and was deemed to be a bug. I believe a build was sent with a fix.
 
Top