Register custom activity


I would like to do a check where username contains admin then only email with specific address can be used during registration activity. However i have no idea about syntax in custom activity and how to use it.

Can someone give direction or atleast some examples?