Updated Readme file
This commit is contained in:
parent
d7145ad772
commit
5f108eee50
1 changed files with 3 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ A tool to help validate data across scenes, prefabs and scriptable objects.
|
|||
|
||||
## Component Validators
|
||||
|
||||
```
|
||||
```c#
|
||||
public sealed class ComponentValidatorMeshCollider : IComponentValidator<MeshCollider>
|
||||
{
|
||||
public void Validate(MeshCollider component, List<ValidatorResult> results)
|
||||
|
|
@ -25,7 +25,7 @@ public sealed class ComponentValidatorMeshCollider : IComponentValidator<MeshCol
|
|||
## Attribute Validators
|
||||
|
||||
The field attrribute:
|
||||
```
|
||||
```c#
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
|
||||
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.
|
||||
|
||||
```
|
||||
```c#
|
||||
public sealed class Validator : IAttributeValidator<RequiredAttribute>
|
||||
{
|
||||
public ValidatorResult Validate(RequiredAttribute attribute, object value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue