Jump to content

Trying to construct a pattern restriction


forthekill
 Share

Recommended Posts

I want to specify a type as being an array of values, all comma seperated.The first number x in the array is the number of pairs of points.Then, there will be x number of pairs (the numbers in each pair cannot exceed 10000), with a maximum of 500 pairs.For example, the array might read:4,100,100,25,100,30,30,254,200I am having trouble figuring out the correct pattern for validation.So far I have:pattern value ="[0-10000]{1}(,[1-10000],[1-10000]{1,500})?"but that doesn't seem to work. I know it isn't quite right but I can't quite decipher the specification explanation of the pattern restriction to make it work.Also, if the tag was blank, it must also be a valid value.Can anyone help?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...