views:

16

answers:

1

Hello, I want to use jquery validation to validate an user input. He has to insert his Steam Id (a thing of a online game) in a form and I want to validate it but I have no ideia how to do that.

The Steam id expression has to like this: STEAM_0:1:2131341411

The thing that is required is this: STEAM_0:

Then it is just numbers

STEAM:0:(number 1 or 0):(numbers)

Maximum of characters of 20.

I've tried to do a regex thing to put in the add.method function but I couldnt,

Thank you, I hope you've understood what I meant

A: 

Try this regular expression: /^STEAM_0:(0|1):[1-9]{1}[0-9]{0,19}$/

CD Sanchez
Yes it works, thank yo very much :D
Afonso