Forráskód Böngészése

application name validation

Manfred Kroehnert 11 éve
szülő
commit
1b234a63f8
1 módosított fájl, 2 hozzáadás és 0 törlés
  1. 2 0
      template.js

+ 2 - 0
template.js

@@ -24,6 +24,8 @@ exports.warnOn = '*';
 
 // The actual init template.
 exports.template = function(grunt, init, done) {
+  init.prompts.name.validator= /^[A-Z][A-Za-z0-9]*$/;
+  init.prompts.name.warning= 'Must be a valid class name: only alphanumeric and starting with an uppercase letter!';
 
   init.process({type: 'amber'}, [
     // Prompt for these values.