Menu icon Foundation

My Posts


My Comments

Tim Cross commented on Tim Cross's post over 4 years

Ha!, yes of course.

Thanks again for confirming.

Cheers

Tim

Tim Cross commented on Tim Cross's post over 4 years

Hi Jeanie.

Thanks for confirming.

Makes sense.

But why does the pattern validation work if I make the field required?

Tim

Tim Cross commented on Tim Cross's post over 4 years

I have a field.

It is a number input type.

It is not required. But I need to check the value if a value is entered.

If it is not a number I want to show an error. I've used the built in patterns for number fields. I've also created my own custom patterns.

Entering non numeric values does not return an error.

If I change the input type to anything other than number the validation on the patterns work .

If I make the field required it also works.

I want to use a number input type.

I don't want it to be required.

I want to show an error if the value is not a number.

Thanks!

Posts Followed

No Content

Following

    No Content

Followers

My Posts

My Comments

You commented on Tim Cross's post over 4 years

Ha!, yes of course.

Thanks again for confirming.

Cheers

Tim

You commented on Tim Cross's post over 4 years

Hi Jeanie.

Thanks for confirming.

Makes sense.

But why does the pattern validation work if I make the field required?

Tim

You commented on Tim Cross's post over 4 years

I have a field.

It is a number input type.

It is not required. But I need to check the value if a value is entered.

If it is not a number I want to show an error. I've used the built in patterns for number fields. I've also created my own custom patterns.

Entering non numeric values does not return an error.

If I change the input type to anything other than number the validation on the patterns work .

If I make the field required it also works.

I want to use a number input type.

I don't want it to be required.

I want to show an error if the value is not a number.

Thanks!

Posts Followed

No Content

Following

  • No Content

Followers

  • No Content