UI for Zipcoin Blue

patternRequired.jst 781B

12345678910111213141516171819202122232425262728293031323334
  1. {{# def.definitions }}
  2. {{# def.errors }}
  3. {{# def.setupKeyword }}
  4. {{
  5. var $key = 'key' + $lvl
  6. , $idx = 'idx' + $lvl
  7. , $matched = 'patternMatched' + $lvl
  8. , $dataProperties = 'dataProperties' + $lvl
  9. , $closingBraces = ''
  10. , $ownProperties = it.opts.ownProperties;
  11. }}
  12. var {{=$valid}} = true;
  13. {{? $ownProperties }}
  14. var {{=$dataProperties}} = undefined;
  15. {{?}}
  16. {{~ $schema:$pProperty }}
  17. var {{=$matched}} = false;
  18. {{# def.iterateProperties }}
  19. {{=$matched}} = {{= it.usePattern($pProperty) }}.test({{=$key}});
  20. if ({{=$matched}}) break;
  21. }
  22. {{ var $missingPattern = it.util.escapeQuotes($pProperty); }}
  23. if (!{{=$matched}}) {
  24. {{=$valid}} = false;
  25. {{# def.addError:'patternRequired' }}
  26. } {{# def.elseIfValid }}
  27. {{~}}
  28. {{= $closingBraces }}