chore: edit filetype attr usage
All checks were successful
continuous-integration/drone/push Build is passing

* allow on {field, property,parameter}
* allow attr to be used only once per item
This commit is contained in:
surtur 2021-02-06 20:31:41 +01:00
parent 820da633b3
commit bd6ce61990
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace pwt_0x01_ng.Models.Validation
{
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false)]
public class FileTypeAttr : ValidationAttribute, IClientModelValidator
{
private readonly string type;