We have a variable with length restriction as well as a required field. If I use attribute it only allows required and if I use simple type it allows only length. What is the preferred method to define the schema for this type of requirement?

TIA