Ionic v5 (React) IonInput: Pattern Attribute Doesn't Appear to be Working

I’m attempting to use the pattern attribute available on IonInputs, but it doesn’t seem to be doing anything. Here’s what I have.

<IonInput type="text" pattern="/^[1-9]\d*(\.\d+)?$/"><IonInput>

The appears to do nothing and ignores the regex pattern. My assumption is that this would restrict inputs that do not match the pattern. Is this assumption correct?

The pattern attribute is a standard HTML one. It does not prevent the user from entering an invalid input, it simply marks the field as invalid if they do, and that can be used for form validation.

So the validation will only when inside a form. Thanks for the clarification!