Regular expression pattern, minimum 1 blank space

2

I have a form with an input field and a pattern attribute that is case sensitive, but I also need to have at least one blank space and more occurrences of spaces at will.

    
asked by anonymous 06.11.2017 / 01:11

1 answer

0

White space [\s] at least one {1,}

<form name="form" action="https://pt.stackoverflow.com/unanswered">
<input type="text" name="name" class="field" required pattern="[\wà-úÀ-Ú ]+[\s]{1,}/?[\wà-úÀ-Ú ]*" />
<input type="submit" value="vai">
</form>
    
06.11.2017 / 04:45