You wont be able to use the Unique database value validation type for this, that is used to make sure the entered value does NOT already exist in the database which is the opposite of what you are trying to accomplish.
You will need to create a recordset, filter the recordset using the code column and the Registration_group_code form element.
A recordset will create a variable that contains the number of rows returned:
where <recordsetName> is the name of the recordset.
Use numeric validation for the validation type, and:
for the server variable.
in the numeric validation settings, set the minimum number to 1
this will make sure at least 1 record matching the entered code is returned.