Skip to content

Commit

Permalink
Added support for patterns on model properties (#2948)
Browse files Browse the repository at this point in the history
  • Loading branch information
ingvirafn authored and wing328 committed May 29, 2019
1 parent 40ec016 commit 8a6d996
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -26,6 +26,9 @@ namespace {{modelPackage}}
{{#required}}
[Required]
{{/required}}
{{#pattern}}
[RegularExpression("{{{pattern}}}")]
{{/pattern}}
[DataMember(Name="{{baseName}}", EmitDefaultValue={{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}})]
{{#isEnum}}
public {{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}?{{/isContainer}}{{/isEnum}} {{name}} { get; set; }
Expand Down

0 comments on commit 8a6d996

Please sign in to comment.