asp.net-validators


Regular Expression that supports multiple currency formats

…衆ロ難τιáo~ 提交于 2019-12-25 01:55:51
问题 I have a regular expression that needs to validate if the text is in a supported currency format. ^(\$|€|Fr.|£|kr|R?)\s*((([1-9](,\d{3}){3})|([1-9]\d{0,2}(,\d{3}){0,2})|(\d{1,10}))(\.\d{1,2})?)\s*(\$|€|Fr.|£|kr|R?)$ I support the following: US Dollar (10000.00 or 10,000.00 or $10,000.00) Euro (10000.00 or 10,000.00 or €10,000.00) Francs (10000.00 or 10'000.00 or Fr.10'000.00) Pounds (10000.00 or 10'000.00 or £10,000.00) Kroner (10000,00 or 10'000.00 or 10.000,00 kr) Rand (10000.00 or 10,000

How to get the 'controlToValidate' property on ClientValidationFunction?

拈花ヽ惹草 提交于 2019-11-28 09:47:07
Lets say I have this code. <asp:TextBox ID="TextBox1" runat="server" /> <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="ValidationFunction1" ControlToValidate="TextBox1" Display="Dynamic" /> And a validationFunction: function ValidationFunction1(sender, args) { } And i would like to know if, inside the function I could get the Control to validate something like: var v = sender.ControlToValidate; Musa Hafalır Actually sender.controltovalidate gives the ClientID of the control. So this seems like a solution. function ValidationFunction1(sender, args){ var v =

How to get the 'controlToValidate' property on ClientValidationFunction?

此生再无相见时 提交于 2019-11-27 05:51:37
问题 Lets say I have this code. <asp:TextBox ID="TextBox1" runat="server" /> <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="ValidationFunction1" ControlToValidate="TextBox1" Display="Dynamic" /> And a validationFunction: function ValidationFunction1(sender, args) { } And i would like to know if, inside the function I could get the Control to validate something like: var v = sender.ControlToValidate; 回答1: Actually sender.controltovalidate gives the ClientID of

工具导航Map