Adding passcode validation in the Register Form
To be able to add a passcode validation in the Register Form, you first need to create or add a text field with a meta key/field name “user_passcode” to the Register Form.
Go to wp-admin> Ultimate Member> Forms> Edit Default Registration
For the passcode to function, it requires customization. You can try this code: