I have a regular expression to validate Feet and inches entered into a feet input field.
RegEX
^([1-2]?[0-9]{1,3})\'([0-9]|[0-1]{2})\"$
HTML
<label for="ft">Feet:</label>
<input type="text" name="ft" id="ft" value="#form.ft#">
jQuery
<script>
$.mask.definitions['h'] = '^([1-2]?[0-9]{1,3})\'([0-9]|[0-1]{2})\"$';
$('#ft').mask('h',{placeholder:'0\'0"'});
</script>
or
$('#ft').mask('???0\'0?0"',{placeholder:'0\'0"'});
What if the optional characters are in the beginning? And you have two spots that are optional?
What I am trying to do:
Is when the user gets to the page in that text box it will already read 0'00" so then when they start filling it out it will just start filling it out keeping the " ' " and " " " already in the box for them. On the feet side going up to 2000 and on the inches side only allowing up to number 11.
I am having trouble either inserting a mask like 0'00" or what to have the symbols stay there and them to start entering from left to right.
Any assistance would be greatly appreciated!