Updated Readme file

This commit is contained in:
Anders Ejlersen 2026-05-18 20:43:33 +02:00
parent d7145ad772
commit 5f108eee50

View file

@ -11,7 +11,7 @@ A tool to help validate data across scenes, prefabs and scriptable objects.
## Component Validators ## Component Validators
``` ```c#
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)
@ -25,7 +25,7 @@ public sealed class ComponentValidatorMeshCollider : IComponentValidator<MeshCol
## Attribute Validators ## Attribute Validators
The field attrribute: The field attrribute:
``` ```c#
[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#
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)