Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new .NET8 specific attributes to entry-format validation #516

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

marierin
Copy link

No description provided.

Copy link
Member

@1nf0rmagician 1nf0rmagician left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two additional remarks

  1. Please update the documentation. Fell free to not only add your new additions but also correct any issues you encountered when using the documentation to understand the Entry concept. As I told you at the beginning, it would be nice if the next person getting into it could understand what it is and what it can be used for without to much additional help from us personally.
  2. Did you decide against the new Base64String validation attribute for a specific reason? Coincidently, we could probably make good use of that validation attribute with the new File System we want to provide😬

public isRequired: boolean;
public isPassword: boolean;
public deniedValue: string[];
public allowedValue: string[];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this there is already a possible Values attribute. We should make the generated entry equivalent between using AllowedValues and our Custom PossibleValues

}

/// <see cref="ICustomSerialization"/>
public virtual EntryValidation CreateValidation(Type memberType, ICustomAttributeProvider attributeProvider)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have expected changes in this method, might be however that they are just hidden behind the encoding change and I overlooked them

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I actually did edit this method as well, but I have no idea where the changes are now... so I'll do it again.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you know, the command center is a web project building on your changes and hence it is not an angular project it unfortunately does not share the entry editor with our commercial web projects.
Therefore, it would be good if you would check that the new validation options are used in the UI, i.e. search the place where the other validation (errors) are depicted and add the new ones there too.

@1nf0rmagician
Copy link
Member

1nf0rmagician commented Jan 22, 2025

One more comment to add: Please check this site, it explains the two different attributes to validate collection length and string length. I think it would be alright to share the field in the validation class, as we also have the IsCollection flag on the entry. Bt you need to make sure in the serialization (and on the consuming site as well) to ignore the wrong attributes and to check for the right things when validating 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants