Instead of using the ValidationPropertyAttribute (which only handles the server side), expose the TextBox through a property. That way you can programmatically attach the validator's ControlToValidate property to its ID.
Be aware that if your custom control implements INamingContainer, the validator will not work because it must be in the same naming container. (My product,
Professional Validation And More, overcomes this limitation and many others of ASP.NET validators.)
--- Peter Blum
Creator of Professional Validation And More Suite, Peter's Date Package, and Peter's Polling Package
www.PeterBlum.com