You can just use the validationControls
- The RequiredFieldValidator Control
- The CompareValidator Control
- The RangeValidator Control
- The RegularExpressionValidator Control
In your case you can use the RegularExpressionValidator control.
Here is a link on how to do that:
RegularExpressionValidation control
hope it helped.