I do the project on Symfony and MongoDB. I need to create a Users model where the length of the login and password values ​​is limited to 32 characters. If I generate entitty for MySQL, then in annotations it is done like this

// ... /** * @ODM\Field(type="string", max=32) */ private $login; // ... 

How do I implement similar restrictions for MongoDB? Thanks in advance for the answers!

    0