im trying to force the user to input comma seperated words and reject any white space seperated words using the pattern attribute thats part of the HTML5 <input/> tag .
My following Expression expression doesn't work even though this says it does when I plug it in and test it.
My expression : ^((([a-zA-Z]\s*)+)\, ?(([a-zA-Z]\s*)+))$
<div class="col-md-6">
<input type="text" id="traits" name = "traits" class="form-control" placeholder = "crazy, hyper, outgoing" pattern="^((([a-zA-Z]\s*)+)\, ?(([a-zA-Z]\s*)+))$" required>
</div>