Guest User

Untitled

a guest
Feb 25th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. define([
  2. 'jquery',
  3. 'moment'
  4. ], function ($, moment) {
  5. 'use strict';
  6.  
  7. return function (validator) {
  8.  
  9. validator.addRule(
  10.  
  11. 'validate-jurgis',
  12. function (value) {
  13. if (value.match(/d/)) {return true;}
  14. else {return false;}
  15.  
  16. },
  17. $.mage.__("Address should contain house number")
  18.  
  19. );
  20.  
  21. return validator;
  22. };
  23. });
  24.  
  25. <script type="text/x-magento-init">
  26. {
  27. "*": {
  28. "Vendor_namespace/js/validator-mixin":{"message":"<?php echo "message text";?>"}
  29. }
  30. }
  31. </script>
  32.  
  33. validator.addRule is not a function
Add Comment
Please, Sign In to add comment