Parse ‘str’ of command ‘cmd’ as an integer between min and max. If either min or max is nil, that value has no bound.
Return true if code is syntactically correct for Ruby.
[Validate]