title: Validate an integer with Groovy
body: <p>I need to validate a text field in Groovy.</p>
  
  <p>My problem is the second line, where I try to check if the string is a number:</p>
  
  <pre><code>println("Valor del año: " + newValue.toString());
  println("Valor true/false añoEntero: " + newValue.toString().isNumber());
  </code></pre>
  
  <p>The output printed is:</p>
  
  <pre><code>Jun 12, 2014 11:17:46 AM UTC    Valor del año: 1995
  Jun 12, 2014 11:17:46 AM UTC    JBO-25150: The method isNumber on class java.lang.String is not permitted.
  </code></pre>
  
  <p>Could you help me with the correct method in Groovy to validate an integer?</p>
  
  <p>Regards,</p>
  
  <p>María</p>