If you want password fields to maintain there entered values when a form is submitted, but is not valid your need to call “setRenderPassoword(true)” on the password element.