Spaces:
Runtime error
Runtime error
Download TaskTrackingSystem.Shared/Models/Role/UpdateRoleDto.cs from Yuruyuruu/task-tracking-system: direct link, hf CLI and curl.
- Browser
- Download file 820 Bytes
-
https://huggingface.co/spaces/Yuruyuruu/task-tracking-system/resolve/main/TaskTrackingSystem.Shared/Models/Role/UpdateRoleDto.cs
- Command line
-
hf download hf://spaces/Yuruyuruu/task-tracking-system/TaskTrackingSystem.Shared/Models/Role/UpdateRoleDto.cs
-
curl -L -o UpdateRoleDto.cs https://huggingface.co/spaces/Yuruyuruu/task-tracking-system/resolve/main/TaskTrackingSystem.Shared/Models/Role/UpdateRoleDto.cs
820 Bytes
| using System.ComponentModel.DataAnnotations; | |
| namespace TaskTrackingSystem.Shared.Models.Role | |
| { | |
| public class UpdateRoleDto : IValidatableObject | |
| { | |
| [] | |
| public string Name { get; set; } = string.Empty; | |
| [] | |
| public string? NameMy { get; set; } | |
| [] | |
| public string? Description { get; set; } | |
| [] | |
| public string? DescriptionMy { get; set; } | |
| public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) | |
| { | |
| if (string.IsNullOrWhiteSpace(Name) && string.IsNullOrWhiteSpace(NameMy)) | |
| { | |
| yield return new ValidationResult("At least one role name is required.", new[] { nameof(Name), nameof(NameMy) }); | |
| } | |
| } | |
| } | |
| } | |