Open javiercn opened 10 months ago
@javiercn Not sure if this is the right place to ask this but I've a Blazor server project with a Dapper connection to SQL Server, I want to check if a field in my form (using EditForm and DataAnnotations validation) is unique or not.
So, I guess I'll have to do some custom validation (attribute or component), I was thinking a validator component would be best in this case but I'm a bit confused for a Blazor server project (without an API), would it be recommended to do such a validation (unique field) using the example similar to Business logic validation with a validator component or Server validation with a validator component
Provided I want to keep doing the Data Annotations validation for common things like required, regex, etc. when the user tabs out but also add this unique field check when the user submits the form (on other successful validation)
The former example makes more sense but I was worried if it polluted the component too much and I'm using Blazor server .net 8 with global interactivity so use the latter example but that is using APIs and I'm not
Thanks a lot for reading through!