Skip to content

Commit 6adc09a

Browse files
updated doc and sdk for template response to include regex value for … (#492)
Co-authored-by: Juan Treminio <[email protected]>
1 parent 9893840 commit 6adc09a

20 files changed

+470
-5
lines changed

openapi-raw.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12286,6 +12286,14 @@ components:
1228612286
- employer_identification_number
1228712287
- custom_regex
1228812288
nullable: true
12289+
validation_custom_regex:
12290+
description: '_t__TemplateResponseDocumentFormField::CUSTOM_REGEX'
12291+
type: string
12292+
nullable: true
12293+
validation_custom_regex_format_label:
12294+
description: '_t__TemplateResponseDocumentFormField::CUSTOM_REGEX_LABEL'
12295+
type: string
12296+
nullable: true
1228912297
group:
1229012298
description: '_t__TemplateResponseDocumentFormField::GROUP'
1229112299
type: string

openapi-sdk.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13130,6 +13130,14 @@ components:
1313013130
- employer_identification_number
1313113131
- custom_regex
1313213132
nullable: true
13133+
validation_custom_regex:
13134+
description: 'When `validation_type` is set to `custom_regex`, this specifies the custom regular expression pattern that will be used to validate the text field.'
13135+
type: string
13136+
nullable: true
13137+
validation_custom_regex_format_label:
13138+
description: 'When `validation_type` is set to `custom_regex`, this specifies the error message displayed to the signer when the text does not match the provided regex pattern.'
13139+
type: string
13140+
nullable: true
1313313141
group:
1313413142
description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.'
1313513143
type: string

openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13108,6 +13108,14 @@ components:
1310813108
- employer_identification_number
1310913109
- custom_regex
1311013110
nullable: true
13111+
validation_custom_regex:
13112+
description: 'When `validation_type` is set to `custom_regex`, this specifies the custom regular expression pattern that will be used to validate the text field.'
13113+
type: string
13114+
nullable: true
13115+
validation_custom_regex_format_label:
13116+
description: 'When `validation_type` is set to `custom_regex`, this specifies the error message displayed to the signer when the text does not match the provided regex pattern.'
13117+
type: string
13118+
nullable: true
1311113119
group:
1311213120
description: 'The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.'
1311313121
type: string

sdks/dotnet/docs/TemplateResponseDocumentFormFieldText.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
1313
**Width** | **int** | The width in pixels of this form field. | [optional]
1414
**Height** | **int** | The height in pixels of this form field. | [optional]
1515
**Required** | **bool** | Boolean showing whether or not this field is required. | [optional]
16-
**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).<br><br>* Text Field uses `TemplateResponseDocumentFormFieldText`<br>* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`<br>* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`<br>* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`<br>* Radio Field uses `TemplateResponseDocumentFormFieldRadio`<br>* Signature Field uses `TemplateResponseDocumentFormFieldSignature`<br>* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`<br>* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "text"]**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] **IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] **OriginalFontSize** | **int** | Original font size used in this form field&#39;s text. | [optional] **FontFamily** | **string** | Font family used in this form field&#39;s text. | [optional] **ValidationType** | **string** | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional]
16+
**Type** | **string** | The type of this form field. See [field types](/api/reference/constants/#field-types).<br><br>* Text Field uses `TemplateResponseDocumentFormFieldText`<br>* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`<br>* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`<br>* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`<br>* Radio Field uses `TemplateResponseDocumentFormFieldRadio`<br>* Signature Field uses `TemplateResponseDocumentFormFieldSignature`<br>* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`<br>* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | [default to "text"]**AvgTextLength** | [**TemplateResponseFieldAvgTextLength**](TemplateResponseFieldAvgTextLength.md) | | [optional] **IsMultiline** | **bool** | Whether this form field is multiline text. | [optional] **OriginalFontSize** | **int** | Original font size used in this form field&#39;s text. | [optional] **FontFamily** | **string** | Font family used in this form field&#39;s text. | [optional] **ValidationType** | **string** | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | [optional] **ValidationCustomRegex** | **string** | When `validation_type` is set to `custom_regex`, this specifies the custom regular expression pattern that will be used to validate the text field. | [optional] **ValidationCustomRegexFormatLabel** | **string** | When `validation_type` is set to `custom_regex`, this specifies the error message displayed to the signer when the text does not match the provided regex pattern. | [optional] **Group** | **string** | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | [optional]
1717

1818
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1919

sdks/dotnet/src/Dropbox.Sign/Model/TemplateResponseDocumentFormFieldText.cs

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ protected TemplateResponseDocumentFormFieldText() { }
122122
/// <param name="originalFontSize">Original font size used in this form field&#39;s text..</param>
123123
/// <param name="fontFamily">Font family used in this form field&#39;s text..</param>
124124
/// <param name="validationType">Each text field may contain a &#x60;validation_type&#x60; parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values..</param>
125+
/// <param name="validationCustomRegex">When &#x60;validation_type&#x60; is set to &#x60;custom_regex&#x60;, this specifies the custom regular expression pattern that will be used to validate the text field..</param>
126+
/// <param name="validationCustomRegexFormatLabel">When &#x60;validation_type&#x60; is set to &#x60;custom_regex&#x60;, this specifies the error message displayed to the signer when the text does not match the provided regex pattern..</param>
125127
/// <param name="group">The name of the group this field is in. If this field is not a group, this defaults to &#x60;null&#x60; except for Radio fields..</param>
126128
/// <param name="apiId">A unique id for the form field..</param>
127129
/// <param name="name">The name of the form field..</param>
@@ -131,7 +133,7 @@ protected TemplateResponseDocumentFormFieldText() { }
131133
/// <param name="width">The width in pixels of this form field..</param>
132134
/// <param name="height">The height in pixels of this form field..</param>
133135
/// <param name="required">Boolean showing whether or not this field is required..</param>
134-
public TemplateResponseDocumentFormFieldText(string type = @"text", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), ValidationTypeEnum? validationType = default(ValidationTypeEnum?), string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool))
136+
public TemplateResponseDocumentFormFieldText(string type = @"text", TemplateResponseFieldAvgTextLength avgTextLength = default(TemplateResponseFieldAvgTextLength), bool isMultiline = default(bool), int originalFontSize = default(int), string fontFamily = default(string), ValidationTypeEnum? validationType = default(ValidationTypeEnum?), string validationCustomRegex = default(string), string validationCustomRegexFormatLabel = default(string), string group = default(string), string apiId = default(string), string name = default(string), Object signer = null, int x = default(int), int y = default(int), int width = default(int), int height = default(int), bool required = default(bool))
135137
{
136138
this.ApiId = apiId;
137139
this.Name = name;
@@ -153,6 +155,8 @@ protected TemplateResponseDocumentFormFieldText() { }
153155
this.OriginalFontSize = originalFontSize;
154156
this.FontFamily = fontFamily;
155157
this.ValidationType = validationType;
158+
this.ValidationCustomRegex = validationCustomRegex;
159+
this.ValidationCustomRegexFormatLabel = validationCustomRegexFormatLabel;
156160
this.Group = group;
157161
}
158162

@@ -206,6 +210,20 @@ public static TemplateResponseDocumentFormFieldText Init(string jsonData)
206210
[DataMember(Name = "fontFamily", EmitDefaultValue = true)]
207211
public string FontFamily { get; set; }
208212

213+
/// <summary>
214+
/// When &#x60;validation_type&#x60; is set to &#x60;custom_regex&#x60;, this specifies the custom regular expression pattern that will be used to validate the text field.
215+
/// </summary>
216+
/// <value>When &#x60;validation_type&#x60; is set to &#x60;custom_regex&#x60;, this specifies the custom regular expression pattern that will be used to validate the text field.</value>
217+
[DataMember(Name = "validation_custom_regex", EmitDefaultValue = true)]
218+
public string ValidationCustomRegex { get; set; }
219+
220+
/// <summary>
221+
/// When &#x60;validation_type&#x60; is set to &#x60;custom_regex&#x60;, this specifies the error message displayed to the signer when the text does not match the provided regex pattern.
222+
/// </summary>
223+
/// <value>When &#x60;validation_type&#x60; is set to &#x60;custom_regex&#x60;, this specifies the error message displayed to the signer when the text does not match the provided regex pattern.</value>
224+
[DataMember(Name = "validation_custom_regex_format_label", EmitDefaultValue = true)]
225+
public string ValidationCustomRegexFormatLabel { get; set; }
226+
209227
/// <summary>
210228
/// The name of the group this field is in. If this field is not a group, this defaults to &#x60;null&#x60; except for Radio fields.
211229
/// </summary>
@@ -228,6 +246,8 @@ public override string ToString()
228246
sb.Append(" OriginalFontSize: ").Append(OriginalFontSize).Append("\n");
229247
sb.Append(" FontFamily: ").Append(FontFamily).Append("\n");
230248
sb.Append(" ValidationType: ").Append(ValidationType).Append("\n");
249+
sb.Append(" ValidationCustomRegex: ").Append(ValidationCustomRegex).Append("\n");
250+
sb.Append(" ValidationCustomRegexFormatLabel: ").Append(ValidationCustomRegexFormatLabel).Append("\n");
231251
sb.Append(" Group: ").Append(Group).Append("\n");
232252
sb.Append("}\n");
233253
return sb.ToString();
@@ -291,6 +311,16 @@ public bool Equals(TemplateResponseDocumentFormFieldText input)
291311
this.ValidationType == input.ValidationType ||
292312
this.ValidationType.Equals(input.ValidationType)
293313
) && base.Equals(input) &&
314+
(
315+
this.ValidationCustomRegex == input.ValidationCustomRegex ||
316+
(this.ValidationCustomRegex != null &&
317+
this.ValidationCustomRegex.Equals(input.ValidationCustomRegex))
318+
) && base.Equals(input) &&
319+
(
320+
this.ValidationCustomRegexFormatLabel == input.ValidationCustomRegexFormatLabel ||
321+
(this.ValidationCustomRegexFormatLabel != null &&
322+
this.ValidationCustomRegexFormatLabel.Equals(input.ValidationCustomRegexFormatLabel))
323+
) && base.Equals(input) &&
294324
(
295325
this.Group == input.Group ||
296326
(this.Group != null &&
@@ -322,6 +352,14 @@ public override int GetHashCode()
322352
hashCode = (hashCode * 59) + this.FontFamily.GetHashCode();
323353
}
324354
hashCode = (hashCode * 59) + this.ValidationType.GetHashCode();
355+
if (this.ValidationCustomRegex != null)
356+
{
357+
hashCode = (hashCode * 59) + this.ValidationCustomRegex.GetHashCode();
358+
}
359+
if (this.ValidationCustomRegexFormatLabel != null)
360+
{
361+
hashCode = (hashCode * 59) + this.ValidationCustomRegexFormatLabel.GetHashCode();
362+
}
325363
if (this.Group != null)
326364
{
327365
hashCode = (hashCode * 59) + this.Group.GetHashCode();
@@ -399,6 +437,20 @@ public List<OpenApiType> GetOpenApiTypes()
399437
Value = ValidationType,
400438
});
401439
types.Add(new OpenApiType()
440+
{
441+
Name = "validation_custom_regex",
442+
Property = "ValidationCustomRegex",
443+
Type = "string",
444+
Value = ValidationCustomRegex,
445+
});
446+
types.Add(new OpenApiType()
447+
{
448+
Name = "validation_custom_regex_format_label",
449+
Property = "ValidationCustomRegexFormatLabel",
450+
Type = "string",
451+
Value = ValidationCustomRegexFormatLabel,
452+
});
453+
types.Add(new OpenApiType()
402454
{
403455
Name = "group",
404456
Property = "Group",

sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ This class extends `TemplateResponseDocumentFormFieldBase`
1414
| `originalFontSize` | ```Integer``` | Original font size used in this form field&#39;s text. | |
1515
| `fontFamily` | ```String``` | Font family used in this form field&#39;s text. | |
1616
| `validationType` | [```ValidationTypeEnum```](#ValidationTypeEnum) | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | |
17+
| `validationCustomRegex` | ```String``` | When `validation_type` is set to `custom_regex`, this specifies the custom regular expression pattern that will be used to validate the text field. | |
18+
| `validationCustomRegexFormatLabel` | ```String``` | When `validation_type` is set to `custom_regex`, this specifies the error message displayed to the signer when the text does not match the provided regex pattern. | |
1719
| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | |
1820

1921

0 commit comments

Comments
 (0)