You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I applied this code in the getTypeAndExample method, just before return out:
getTypeAndExample(node){if(!node){node={};}letout={};
...
out.minLength=node.length||node.min;out.maxLength=node.length||node.max;/**** New code - Add pattern support ****/if(node.pattern&&(node.pattern.length>0||node.pattern.source.length>0))out.pattern=newRegExp(node.pattern).source;returnout;},
Can this solution be valid? Or it's necessary to apply something else in other places? If the solution is correct can you add this feature to your code?
The text was updated successfully, but these errors were encountered:
Feature request - Parameters pattern
Hi, I need to have a support for indicating pattern like validation in the parameters. For example:
or
The patterns can be declared as RegExp (first example) or as a String (second example).
I tried to do something by myself and I realized this solution:
I applied this code in the
getTypeAndExample
method, just beforereturn out
:Can this solution be valid? Or it's necessary to apply something else in other places? If the solution is correct can you add this feature to your code?
The text was updated successfully, but these errors were encountered: