Consider the following set of codes:
<form>
<label for="user_data">Input the angle:</label>
<input type="text" id="user_data" name="user_data" pattern="[0-9][+]" title="Valid input required"><br><br>
<input type="submit">
</form>
If the user inputs just any number, it's ok. But he inputs a +
sign, then there must be something after the plus sign. But the above program doesn't work. I know that this type of questions have been answered earlier, but I just want to know if the pattern=[0-9][+]
is valid so that the user is only allowed to input any number with a plus sign in it.
Edit: The input can never start with a + sign. Valid inputs can be 3+4 or only 3.