Scratching my head on this one. I've added a bunch of local variables to double check and also helps to explain.

I'm creating a registration page and I've added a second password input to do the standard compare.

I also want a password of 8 characters minimum.

I'm deliberately not entering any password to test the rules. The debugger shows the values of the local variables as:

ConfirmPassword is the local variable I am assigning the second password to. As you can see neither the local variable or the User.Password have a value. Also that the length is correctly shown as zero from this assign:

This assign compares the passwords for being equal - the above and below are purely for debugging purposes:

I am then performing assigns for the form validation before checking Form.Valid:

However the result of this last assign is inconsistent with my own local assignments:

I've used not (<expression>) but use of <> also gives the wrong results.

Next I enter a password:

My PasswordsMatch local variable is correct but the form validation still says no:

And then finally:

I could just use the local variables to drive the validation, but that seems wrong.

I've even turned Mandatory off for both Password inputs as I thought that my be affecting things.

Am I missing something obvious here?



Did you try removing the 'not'?
From what I can see it now says:

Input_ConfirmPassword.valid  = False when they match, and True when they don't match.


The problem it's the not.

You are changing the value of the expression with that.  if password and the confirm password are equal the not will change your true expression to false