0

I am currently adding custom fields (by custom code) to the single product page in WooCommerce using the OceanWP theme. I was about to start custom validation to the fields when I noticed that the fields already had some validation and the result looks quite nice.

When the Add to Cart button is pressed and a field is invalid I get the following message pop-up: enter image description here

I'm not sure whether the warning popup is part of WordPress, WooCommerce or OceanWP.

My question is: can I can use this built-in warning popup for my own validation messages?

2
  • That might be browser's inbuilt validation popup (on an input with type="number" and required="required" attributes. It's definitely not part of WP, and I don't think it's part of Woocommerce. Could be the theme. – Dan. May 3 '20 at 19:15
  • I think it is probably the theme then. I'm using Firefox and I haven't seen that anywhere else before. Thanks for the advice! – Ewan Harold May 4 '20 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.