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

Feat: Added minSize property to string attribute. #270

Conversation

singhbhaskar
Copy link

Description

Added minSize for string attribute for Issue:
appwrite/appwrite#5403

Testing

Build appwrite docker image with the change to test

  • Ensure that minSize is added for string attribute.
  • Attribute with minSize is enforced on document when created.

@fogelito
Copy link
Contributor

fogelito commented May 22, 2023

Hey, @singhbhaskar thank you for this PR 👍
Database attributes usually do not have an option for limiting length, I say usually because there is an option for it on MariaDB using
CHECK (LENGTH(attr) >= 10);
In this case, using $formatOptions on Appwrite's side can be a nice solution as we do in the Integer attribute, as more community members will vote for this feature.

@singhbhaskar
Copy link
Author

Sure @fogelito ,
I will check the implementation for $formatOptions and update here. Thanks for the suggestion

@singhbhaskar
Copy link
Author

Hi @fogelito ,
I was able to implement without making changes to Uthopia as per your suggestion of formatOptions. Hence closing this PR. Thanks for the suggestion.

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.

None yet

2 participants