code: public static boolean validateLongRange( Object bean, ValidatorAction va, Field field, ActionMessages errors,
                                               HttpServletRequest request )
      {
  
          String value;
          
          if ( isString( bean ) )
          {
              value = ( String ) bean;
          }
          else
          {
              value = ValidatorUtil.getValueAsString( bean, field.getProperty() );
          }
  
          if ( ! GenericValidator.isBlankOrNull( value ) )
          {
              try
              {
                  long longValue = Long.parseLong( value );
                  long min = Long.parseLong( field.getVarValue( "min" ) );
                  long max = Long.parseLong( field.getVarValue( "max" ) );
  
                  if ( longValue < min || longValue > max )
                  {
                      errors.add( field.getKey(), Resources.getActionError( request, va, field ) );
                      return false;
                  }
              }
              catch ( Exception e )
              {
                  errors.add( field.getKey(), Resources.getActionError( request, va, field ) );
                  return false;
              }
          }
  
          return true;
      }
docs: Check if a field's value is within a range ("min" and "max" Long variables on the passed-in Field).
  
  @param bean the bean that validation is being performed on.
  @param va the <code>ValidatorAction</code> that is currently being performed.
  @param field the <code>Field</code> object associated with the current field being validated.
  @param errors the <code>ActionMessages</code> object to add errors to if any validation errors occur.
  @param request the current request object.
  @return <code>true</code> if in range, false otherwise.