the validation toolkit wizard does not support using dynamic data in regular expression validation. It will require some hand coding to accomplish, and depends on how the database is set up.
Is the database set up so that one record contains a pipe separated listing of the domains:
+----------|----------------------------------+
| domainID | domainNames |
+----------|----------------------------------+
| 1 | apple.com|ibm.com|webassist.com |
+----------|----------------------------------+
or is there a separate record for each allowed domain?
+----------|---------------+
| domainID | domainNames |
+----------|---------------+
| 1 | apple.com |
+----------|---------------+
| 2 | ibm.com |
+----------|---------------+
| 3 | webassist.com |
+----------|---------------+
Once i know the answer to that question, i can give you instructions for modifying the validation code.