Foundation initialization was misplaced in the example, hence it was confusing. Discussed in #9773.
Foundation.Abide.defaults.patterns['dashes_only'] = /^[0-9-]*$/;
Foundation.Abide.defaults.validators['greater_than'] =
-// Init Foundation
-$(document).foundation();
-
function($el,required,parent) {
// parameter 1 is jQuery selector
if (!required) return true;
to = $el.val();
return (parseInt(to) > parseInt(from));
};
+
+// Init Foundation
+$(document).foundation();
+
```
```html
<input id="phone" type="text" pattern="dashes_only" required >