Skip to content

Commit

Permalink
Update prepare-field.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Sep 23, 2024
1 parent 2160550 commit 949f4e1
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions generators/base-application/support/prepare-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,6 @@ function prepareCommonFieldForTemplates(entityWithConfig: Entity, field: Field,
generator.log.warn(`${field.fieldName} pattern is not valid: ${field.fieldValidateRulesPattern}. Skipping generating fake data. `);
return undefined;
}
try {
return faker.helpers.fromRegExp(field.fieldValidateRulesPattern!);
} catch {
// if faker fails to generate data, we will try using RandExp.
}
const re = faker.createRandexp(field.fieldValidateRulesPattern!);
if (!re) {
generator.log.warn(`Error creating generator for pattern ${field.fieldValidateRulesPattern}`);
Expand Down

0 comments on commit 949f4e1

Please sign in to comment.