# YamlLintQuoteRequirement

When the YamlLintRules.QuotedStrings rule expects string values to be quoted.

Enum 

`OfficeIMO.Yaml`

**Namespace**

`OfficeIMO.Yaml`

**Assembly**

`OfficeIMO.Yaml`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[YamlLintOptions.cs:263](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L263)

**Base**

`Enum`

**Implements**

`IComparable` `ISpanFormattable` `IFormattable` `IConvertible`

**Modifiers**

sealed

When the [YamlLintRules.QuotedStrings](/api/yaml/officeimo-yaml-yamllintrules/) rule expects string values to be quoted.

## Inheritance

- Enum
- YamlLintQuoteRequirement

## Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 4

- Property [YamlLintQuotedStringsOptions.Required](/api/yaml/officeimo-yaml-yamllintquotedstringsoptions/#property-required)
- Field [YamlLintQuoteRequirement.Always](/api/yaml/officeimo-yaml-yamllintquoterequirement/#field-always)
- Field [YamlLintQuoteRequirement.OnlyWhenNeeded](/api/yaml/officeimo-yaml-yamllintquoterequirement/#field-onlywhenneeded)
- Field [YamlLintQuoteRequirement.Optional](/api/yaml/officeimo-yaml-yamllintquoterequirement/#field-optional)

Filter members 

Show inherited

## Inherited Methods

`public int CompareTo(object? target)` [#](#method-compareto-object)

Inherited from Enum

Parameters

**target object? required**

Returns

`int`

`public override bool Equals(object? obj)` [#](#method-equals-object)

Inherited from Enum

Parameters

**obj object? required**

Returns

`bool`

`public override int GetHashCode()` [#](#method-gethashcode)

Inherited from Enum

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public TypeCode GetTypeCode()` [#](#method-gettypecode)

Inherited from Enum

Returns

`TypeCode`

`public bool HasFlag(Enum flag)` [#](#method-hasflag-enum)

Inherited from Enum

Parameters

**flag Enum required**

Returns

`bool`

ToString 4 overloads

`public override string ToString()` [#](#method-tostring)

Inherited from Enum

Returns

`string`

`public string ToString(string? format)` [#](#method-tostring-string)

Inherited from Enum

Parameters

**format string? required**

Returns

`string`

`public string ToString(IFormatProvider? provider)` [#](#method-tostring-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString() instead.")`

Parameters

**provider IFormatProvider? required**

Returns

`string`

`public string ToString(string? format, IFormatProvider? provider)` [#](#method-tostring-string-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString(String) instead.")`

Parameters

**format string? required**

**provider IFormatProvider? required**

Returns

`string`

## Values

`public const YamlLintQuoteRequirement Always` [#](#field-always)

[YamlLintOptions.cs:265](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L265)

Every string value is quoted.

Value: `0`

`public const YamlLintQuoteRequirement Optional` [#](#field-optional)

[YamlLintOptions.cs:267](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L267)

Quoting is optional; only the quote type is checked.

Value: `1`

`public const YamlLintQuoteRequirement OnlyWhenNeeded` [#](#field-onlywhenneeded)

[YamlLintOptions.cs:269](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Yaml/Lint/YamlLintOptions.cs#L269)

Only values that would read as something else, or cannot be written plain, are quoted.

Value: `2`

<!-- PowerForge markdown artifact sha256:708D9CDAE87089C6D8AF2798B575F618C519C7BAABFC8383FEC4BC834B668597 -->
