How can I create a regex in jQuery to validate a textbox with given constraints