Forcing html Input element to Numeric Only Input

While developing a shopping cart function for a client, I needed to restrict the user to entering numbers only in an Input fieldI came across this handy post;http://www.itjungles.com/javascript/how-to-use-javascript-to-force-numeric-value-in-textboxBasically, we need to add the following function to the JavaScript section; function isNumericKey(evt){ var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode [...]

By |2017-07-24T08:33:18+01:00January 21st, 2013|HTML, Javascript, Validation, Web|0 Comments

MVVM WPF Validating multiple items together

In an application I am developing, I required that two checkboxes be validated together, when either one of them were clicked. I also needed to only show the Validation error once in my Error Message Box. To achieve this we first call the OnPropertyChanged routine, which in turn raises the PropertyChanged event, for each linked [...]

By |2017-03-25T07:46:17+00:00January 7th, 2013|.Net Framework, MVVM, Tips, Validation, VB.net, WPF, XAML|0 Comments

Validating an Email Address

In order to validate an email address, use the following function; Public Function IsValidEmailAddress(ByVal EmailAddress As String) As Boolean Dim Expression As New System.Text.RegularExpressions.Regex("S+@S+.S+")  If EmailAddress = "" Then  Return True  Else  Return Expression.IsMatch(EmailAddress)  End If End Function

By |2013-01-07T14:00:00+00:00January 7th, 2013|.Net Framework, Validation, VB.net, Web|0 Comments