I'm using Modelio to create an xmi to use with jhipster-uml.
Is there a way to add validation rules to the attributes in Modelio so that when the xmi is imported, the validation rules(required, minimum length, maximum length, etc.) would be in the entities?
For example, the json generated currently looks like this:
{
"relationships": [],
"fields": [
{
"fieldId": 1,
"fieldName": "name",
"fieldType": "String"
},
],
"changelogDate": "20160118185613",
"dto": "no",
"pagination": "no"
}
but I want to make it look like this (this was generated using yo jhipster:entity
):
{
"relationships": [],
"fields": [
{
"fieldId": 1,
"fieldName": "name",
"fieldType": "String",
"fieldValidateRules": [
"required",
"minlength",
"maxlength",
"pattern"
],
"fieldValidateRulesMinlength": "10",
"fieldValidateRulesMaxlength": "100",
"fieldValidateRulesPattern": "^[a-zA-Z0-9]*$",
"fieldValidateRulesPatternJava": "^[a-zA-Z0-9]*$"
},
],
"changelogDate": "20160118184133",
"dto": "no",
"service": "no",
"pagination": "no"
}