You have an ASP.NET Web Forms application for processing orders.
Many users of the application submit their order forms multiple times due to incorrectly formatted credit card information.
You need to plan for validation of the length and format of data in the credit card field on the client side prior to processing each transaction.
Which approach should you recommend?
A.
Use a CustomValidator control in the Page_Load method.
B.
Use a CustomValidator control in the OnServerValidate method.
C.
Use a RequiredFieldValidator control and a CompareValidator control.
D.
Use a RequiredFieldValidator control and a RegularExpressionValidator control.
Explanation:
RequiredFieldValidator used for check is value do not empty
RegularExpressionValidator – check value is correct by regular expression