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

Annotation to add document validation to a collection #956

Closed
ulrichcech opened this issue Jun 29, 2016 · 4 comments
Closed

Annotation to add document validation to a collection #956

ulrichcech opened this issue Jun 29, 2016 · 4 comments
Milestone

Comments

@ulrichcech
Copy link
Contributor

Are there already plans to introduce an annotation to define a document validator on an entity (collection)? Like adding and index?

@Entity
@Validator(validator="{$and: [{lastname: {$exists: true}}, {ssn: {$exists: true}}]}" , validationLevel="strict", validationAction="error")
public class User {
   ....
}

I could try to start a prototype on this and if it works, implement it completely.

@evanchooly
Copy link
Member

I know you'd talked about prototyping this but i'm in a hotel tonight and slightly bored so I banged out a prototype. Take a look at the commit above and see what you think.

@evanchooly
Copy link
Member

probably easier to just look at the docvalidation branch in general.

@ulrichcech
Copy link
Contributor Author

I was waiting for a response, if this feature is planned or somewhere on the roadmap, but ok, you branch looks nice... I was thinking about the same way of implementing it.

@evanchooly
Copy link
Member

I apologize. I should've left this one for you. Hotel boredom got the best of me. Anything else catch your eye you'd like to tackle? Current issue or missing feature?

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

No branches or pull requests

2 participants