Search code examples
thrift

Regex constraint on string type in thrift


Is there a way that one can put a regex constraint on string field in struct in Thrift IDL? Eg. I wanted to make a restriction on one field which is string that its value should have some particular prefix?


Solution

  • Simple answer: No.

    Restrictions are supposed to be handled in the application logic.