The basic concept of validating a form in Mendix by using a microflow is you create a variale and set it to true. Then for each inputfield you create an decision and check that field (e.g. Username !=empty) if this is false then you set the variable to false and put a validation feedback activity and give some feedback. If it is true then you merge the true outcome and false outcome and continue to the next decision…
so this is the basic concept:
Have a look at the documentation on setting up data validation. It gives various approaches and techniques you can try out.
https://docs.mendix.com/howto/data-models/setting-up-data-validation
For example, if you want to cheque uniqueness, you could setup a microflow to try to retrieve using that value as an XPath constraint. If you have data returning, it’s not unique.