Updated readme

This commit is contained in:
Anders Ejlersen 2026-05-18 20:53:00 +02:00
parent 5f108eee50
commit c8a6815316

View file

@ -11,7 +11,7 @@ A tool to help validate data across scenes, prefabs and scriptable objects.
## Component Validators ## Component Validators
```c# ```csharp
public sealed class ComponentValidatorMeshCollider : IComponentValidator<MeshCollider> public sealed class ComponentValidatorMeshCollider : IComponentValidator<MeshCollider>
{ {
public void Validate(MeshCollider component, List<ValidatorResult> results) public void Validate(MeshCollider component, List<ValidatorResult> results)
@ -24,8 +24,8 @@ public sealed class ComponentValidatorMeshCollider : IComponentValidator<MeshCol
## Attribute Validators ## Attribute Validators
The field attrribute: The field attribute:
```c# ```csharp
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)] [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
public sealed class RequiredAttribute : Attribute public sealed class RequiredAttribute : Attribute
{ {
@ -45,7 +45,7 @@ public sealed class RequiredAttribute : Attribute
The validator implements `IAttributeValidator<T>`, where `T` is the attribute and will automatically be found by the validator. The validator implements `IAttributeValidator<T>`, where `T` is the attribute and will automatically be found by the validator.
```c# ```csharp
public sealed class Validator : IAttributeValidator<RequiredAttribute> public sealed class Validator : IAttributeValidator<RequiredAttribute>
{ {
public ValidatorResult Validate(RequiredAttribute attribute, object value) public ValidatorResult Validate(RequiredAttribute attribute, object value)