Form password and password confirm

I’m implementing a form using a FieldFactory and I was wondering, is there a simple way of adding a password and a (virtual) password confirm box within it, or do I have to build something manually outside of the form?

Well, if you use a FormFieldFactory to create the fields, you could return a composite component that handles the password retype validation. Notice that the returned component has to be a Field; you could perhaps use the CustomField add-on from Directory to do the composition. Not sure if this is simple enough…