Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

123456789101112131415161718192021222324252627282930
  1. {{# def.definitions }}
  2. {{# def.errors }}
  3. {{# def.setupKeyword }}
  4. {{# def.$data }}
  5. {{
  6. var $i = 'i' + $lvl
  7. , $vSchema = 'schema' + $lvl;
  8. }}
  9. {{? !$isData }}
  10. var {{=$vSchema}} = validate.schema{{=$schemaPath}};
  11. {{?}}
  12. var {{=$valid}};
  13. {{?$isData}}{{# def.check$dataIsArray }}{{?}}
  14. {{=$valid}} = false;
  15. for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++)
  16. if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) {
  17. {{=$valid}} = true;
  18. break;
  19. }
  20. {{? $isData }} } {{?}}
  21. {{# def.checkError:'enum' }}
  22. {{? $breakOnError }} else { {{?}}