소스 검색

application name validation

Manfred Kroehnert 11 년 전
부모
커밋
1b234a63f8
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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.