There are a number of things that need to be done to make this sort of thing work with the existing registration module.
Just creating a new data profile type and an extra field would not in itself achieve the result you are looking for.
There are things going on in the registration module that would break if not handled correctly.
These are the steps that going down this sort of route would likely require.
1. Create a new data profile type control -- this would need to be done in c# - and be called something like myControls.WebControls.emailComparerControl
This controller could be based on the existing DotNetNuke.UI.WebControls.TextEditControl control with some client side code to handle the validation
Have a look at
http://www.codeproject.com/Articles/2... - it talks about how to inject a validator as part of a control - in this case i would maybe inject a custom validator - that uses some client side script to do the validation
Have a look at
http://msdn.microsoft.com/en-us/libra...(v=vs.110).aspx it talks about how to use a custom validator in code.
Either way - the trick is going to making sure it can find the Email field - since this field is dynamically registered - there is going to maybe need to be a DOM search to find the right field - in this case its going to be ID ends in 'Email_TextBox' - might be jquery is the quickest route here.
Regardless - once you got this control coded and compiled or loaded in /app_code/ then you need to register it with dnn.
2. Create a new data profile type - call it say EmailComparerType - this part is done in the Host -> Lists section
This data profile type will need to reference the new controller you created in step 1
3. Create a new User Profile field in Admin->Site Settings -> User Profile - call it EmailComparer and set its data type to EmailComparerType - also make sure its an admin only field for visibility.
You can also put your tooltip and error message defaults in here for later
4. Now in the same User Profile area - up near the top you need to switch the registration type from Standard to Custom.
Then in the field below you put in the name of the fields to be shown on the registration page - Username, Password, PasswordCompare,Email, and the new EmailComparer you created in step one
---------------
Assuming the code you created in the emailComparerControl is correct - the next time you browse to the registration page you should see your new fields - and your custom control should automatically do its thing as part of the automated validation processes.