O'Reilly logo

Getting Started with Zurb Foundation 4 by Andrew D. Patterson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Abide

Abide takes forms to a whole new level by providing field input validation. Fields can be marked as required, and they can be masked with a pattern that they must match. You can easily add error messages for incorrect entries.

Abide has its own JavaScript file in addition to the form's JavaScript file. Make sure you get both if you want to use Abide. When you install Abide, you only have to worry about JavaScript. Foundation does not provide any additional styles for this plugin.

To set up a form to use Abide, add the data-abide attribute to the form element:

<form data-abide> <!-- form elements --> </form>

Then for each form input element, you can add a required attribute and a pattern attribute with a value or an error message. Here is an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required