Bear Bibeault wrote:Is this not something you can simply use pattern for?
Al Hobbs wrote:The pattern bear was referring to was the pattern attribute. You put the regex in there. That regex I gave you wont allow 10
You can do this: (?:10|\d (?:\.\d)?)
The extra 10 in there looks a bit hacky though
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Al Hobbs wrote:Like Bear said, you can use the pattern attribute. Look up html pattern attribute. You put the regex as the value and the field will allow the input only if it fits the regex.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |