Skip to content
Advertisement

Tag: validation

South African ID Number Validate and Get Age and Gender

I’ve researched this but none of the code I use seems to work. South African ID numbers contain date of birth and gender. All I want is it to pull in that information and verify it when their ID number is entered into an input field, preferably in jQuery or javascript Any help is appreciated, Dawid Answer You could use

Max characters in textarea with jquery

I have the following code, and I’m kind of stuck on what to do next. The idea is when you enter text into a text area a counter tells you how many characters you have left. Once you get to the max characters I want to stop allowing characters to be entered, or delete all the characters that were entered

JavaScript file upload size validation

Is there any way to check file size before uploading it using JavaScript? Answer Yes, you can use the File API for this. Here’s a complete example (see comments): Slightly off-topic, but: Note that client-side validation is no substitute for server-side validation. Client-side validation is purely to make it possible to provide a nicer user experience. For instance, if you

How can I check if a string is a valid number?

I’m hoping there’s something in the same conceptual space as the old VB6 IsNumeric() function? Answer 2nd October 2020: note that many bare-bones approaches are fraught with subtle bugs (eg. whitespace, implicit partial parsing, radix, coercion of arrays etc.) that many of the answers here fail to take into account. The following implementation might work for you, but note that

Advertisement