Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define([
- 'jquery',
- 'moment'
- ], function ($, moment) {
- 'use strict';
- return function (validator) {
- validator.addRule(
- 'validate-jurgis',
- function (value) {
- if (value.match(/d/)) {return true;}
- else {return false;}
- },
- $.mage.__("Address should contain house number")
- );
- return validator;
- };
- });
- <script type="text/x-magento-init">
- {
- "*": {
- "Vendor_namespace/js/validator-mixin":{"message":"<?php echo "message text";?>"}
- }
- }
- </script>
- validator.addRule is not a function
Add Comment
Please, Sign In to add comment