chore: update insert_final_newline setting
This commit is contained in:
parent
d97cbbaa1c
commit
2572bd3695
151 changed files with 151 additions and 151 deletions
|
|
@ -45,4 +45,4 @@ public interface IPropertyRuleBuilder<T, out TProperty>
|
|||
/// <param name="severity">The severity level of the validation rule.</param>
|
||||
/// <returns>The current rule builder instance for method chaining.</returns>
|
||||
IPropertyRuleBuilder<T, TProperty> WithSeverity(Severity severity);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,4 +28,4 @@ public interface IValidator<in T> : IValidator
|
|||
/// <param name="instance">The instance of type <typeparamref name="T"/> to validate.</param>
|
||||
/// <returns>A <see cref="Validation"/> object containing the results of the validation, including any problems encountered.</returns>
|
||||
Validation Validate(T instance);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,4 +32,4 @@ public record Problem
|
|||
/// The property value that caused the failure.
|
||||
/// </summary>
|
||||
public object? AttemptedValue { get; init; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,4 +166,4 @@ internal sealed class PropertyPathJsonConverter : JsonConverter<PropertyPath>
|
|||
{
|
||||
writer.WriteStringValue(value.ToJsonName(options.PropertyNamingPolicy));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,4 +133,4 @@ internal sealed record CollectionRule<T, TElement> : Rule<T, TElement>
|
|||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,4 +316,4 @@ public static class RuleBuilderExtensions
|
|||
return rule.Must(value => IsNull(value) || regex.IsMatch(value),
|
||||
"Value is not in the correct format.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,4 +61,4 @@ internal sealed record ValidatorRuleStep<TValue> : IRuleStep<TValue>
|
|||
yield return problem with { PropertyPath = propertyPath + problem.PropertyPath };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,4 +22,4 @@ public enum Severity
|
|||
/// Info
|
||||
/// </summary>
|
||||
Info,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,4 +29,4 @@ public sealed class Validation
|
|||
/// The problems that were found during validation.
|
||||
/// </summary>
|
||||
public IReadOnlyList<Problem> Problems { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,4 +61,4 @@ public sealed class ValidationContext<T> : ValidationContext
|
|||
/// The object currently being validated.
|
||||
/// </summary>
|
||||
public new T? Instance => base.Instance is T value ? value : default;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,4 +140,4 @@ public abstract class Validator<T> : IValidator<T>
|
|||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue