[Cubicweb] [cubicweb] Constraint an Entity's attribute of type String to a regular expression?

christine.absil at engie.com christine.absil at engie.com
Thu Sep 10 14:31:16 CEST 2020

Hi all,

A simple (and stupid?) question : in a cubicweb schema, is it ("natively") possible to constrain an Entity string attribute to a regular expression?
Would there be a dedicated param of the String function to declare that?

For instance, if I wanted my Organisations names not to contain any "_" character

class Organisation(EntityType):
    name = String(required=True, unique=True, maxsize=255)

Many thanks



ENGIE Mail Disclaimer: http://www.engie.com/disclaimer/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20200910/d02fe566/attachment-0026.html>

More information about the Cubicweb mailing list