error message if a valid naumber is not entered to criteria dialog
        boxes
19426
def show_crit_window_err_messege(self, crit):
        
        dlg = wx.MessageDialog(
            self, caption="Error:", message="not a vaild value for statistic %s\n ignoring value" % crit, style=wx.OK)
        result = self.show_dlg(dlg)
        if result == wx.ID_OK:
            dlg.Destroy()
1142854
def validate(self, value, messages=None):
        
        valid     = True
        primitive = value

        def log(msg):
            if messages is not None:
                messages.append(msg)

        if self.enum:
            if value not in self.enum.values():
                valid = False
                flds = (self.name, str(value))
                log("%s value '%s' not in allowed enumerated values." % flds)
            else:
                primitive = int(self.enum.keys()[self.enum.values().index(value)])

        if self.type:
            if self.type.validate(primitive, messages, self.name) is False:
                valid = False

        return valid
123106
@SuppressWarnings("nls")
	private void checkNotNull(Object sourceClass, Object eventSetName, Object alistenerType, Object listenerMethodName)
	{
		if (sourceClass == null)
		{
			throw new NullPointerException(Messages.getString("beans.0C"));
		}
		if (eventSetName == null)
		{
			throw new NullPointerException(Messages.getString("beans.53"));
		}
		if (alistenerType == null)
		{
			throw new NullPointerException(Messages.getString("beans.54"));
		}
		if (listenerMethodName == null)
		{
			throw new NullPointerException(Messages.getString("beans.52"));
		}
	}
285693
public static void notNegative(Integer value) {
		if(!validation) return;
		Validate.notNull(value);
		if(value < 0)
			throw new ParameterException(ErrorCode.NEGATIVE);
	}
155473
def no_intersection(to_validate, constraint, violation_cfg):
    
    if len(constraint) == 0 or len(set(constraint).intersection(to_validate)) > 0:
        return None
    else:
        violation_cfg[Check.CFG_KEY_VIOLATION_MSG] = violation_cfg[Check.CFG_KEY_VIOLATION_MSG].format(constraint)
        return violation_cfg
513788
private void validate(TaskDef taskDef) {
        Preconditions.checkNotNull(taskDef, "TaskDef object cannot be null");
        Preconditions.checkNotNull(taskDef.getName(), "TaskDef name cannot be null");
    }
835586
private void validateInput(String resourceName, Collection<String> requiredRoles) {
        if (requiredRoles == null) {
            throw new NullPointerException("requiredRoles cannot be null.");
        } else if (resourceName == null) {
            throw new NullPointerException("resourceName cannot be null.");
        }
    }
758225
public static void checkQuery(SpiQuery<?> query, ListExpressionValidation validation, boolean ignoreUnknown) {
        if (query != null) {
            validate(query.getWhereExpressions(), validation, ignoreUnknown);
            validate(query.getHavingExpressions(), validation, ignoreUnknown);
            validate(query.getOrderBy(), validation, ignoreUnknown);

            Set<String> invalid = validation.getUnknownProperties();

            if (!ignoreUnknown && !invalid.isEmpty()) {
                UnprocessableEntityException.throwQuery(invalid);
            }
        }
    }
1351548
public static void validateNotNull( Object object, String identifier )
        throws PreConditionException
    {
        if( object == null )
        {
            throw new PreConditionException( identifier + " was NULL." );
        }
    }
1255117
function intValidatorWithErrors( n, min, max, caller, name ) {
            if ( n < min || n > max || n != truncate(n) ) {
                raise( caller, ( name || 'decimal places' ) +
                  ( n < min || n > max ? ' out of range' : ' not an integer' ), n );
            }

            return true;
        }
744459
function InvalidValidationRuleParameter(ruleParameter, reason) {
  var defaultMessage = sprintf('%s is not a valid rule parameter.', ruleParameter);
  this.message = reason ? sprintf('%s. %s', defaultMessage, reason) : defaultMessage;
  this.name = 'InvalidValidationRuleParameter';

  Error.captureStackTrace(this, InvalidValidationRuleParameter);
}
193170
private void validate(WorkflowDef def) {
        Preconditions.checkNotNull(def, "WorkflowDef object cannot be null");
        Preconditions.checkNotNull(def.getName(), "WorkflowDef name cannot be null");
    }
819923
@Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        List<String> emailAddresses = EmailAddressesParser.parse(value);
        List<String> badAddresses = null;
        for (String ea : emailAddresses) {
            if (!EMAIL_VALIDATOR.isValid(ea, null)) {
                if (badAddresses == null) {
                    badAddresses = new LinkedList<String>();
                }

                badAddresses.add(ea);
            }
        }

        if (badAddresses != null) {
            context.disableDefaultConstraintViolation();
            context.buildConstraintViolationWithTemplate(MessageFormat.format(constraintAnnotation.message(),
                                                                              StringUtils.join(badAddresses, ", ")))
                   .addConstraintViolation();
        }
        return (badAddresses == null);
    }
110692
@Override
    public void validate(final FacesContext context) {
        if (context == null) {
            throw new NullPointerException();
        }

        final Validator[] validators = getValidators();
        final Object value = getValue();

        if (!validateRequired(context, value)) {
            return;
        }

        if (validators == null) {
            return;
        }

        for (final Validator validator : validators) {
            try {
                validator.validate(context, this, value);
            }
            catch (final ValidatorException ve) {
                // If the validator throws an exception, we're
                // invalid, and we need to add a message
                setValid(false);
                FacesMessage message;
                final String validatorMessageString = getValidatorMessage();

                if (null != validatorMessageString) {
                    message = new FacesMessage(FacesMessage.SEVERITY_ERROR,
                                validatorMessageString,
                                validatorMessageString);
                    message.setSeverity(FacesMessage.SEVERITY_ERROR);
                }
                else {
                    final Collection<FacesMessage> messages = ve.getFacesMessages();
                    if (null != messages) {
                        message = null;
                        final String cid = getClientId(context);
                        for (final FacesMessage m : messages) {
                            context.addMessage(cid, m);
                        }
                    }
                    else {
                        message = ve.getFacesMessage();
                    }
                }
                if (message != null) {
                    final Sheet sheet = getSheet();
                    if (sheet == null) {
                        return;
                    }
                    context.addMessage(getClientId(context), message);
                    sheet.getInvalidUpdates().add(
                                new SheetInvalidUpdate(sheet.getRowKeyValue(context), sheet.getColumns().indexOf(this), this, value,
                                            message.getDetail()));

                }
            }
        }

    }
1352519
public static void checkNumOfArgsNoLessThan(Command cmd, CommandLine cl, int n) throws
      InvalidArgumentException {
    if (cl.getArgs().length < n) {
      throw new InvalidArgumentException(ExceptionMessage.INVALID_ARGS_NUM_INSUFFICIENT
          .getMessage(cmd.getCommandName(), n, cl.getArgs().length));
    }
  }
92607
def __validInputs(self):
        """"""
        #if not isinstance(self.__column, Column):
        #    raise Sitools2Exception("column must be an instance of Column") 
        if self.__type not in self.__TYPE:
            raise Sitools2Exception("Type must be one of these values : numeric, string, boolean")
        if self.__comparison not in self.__COMPARISON:
            raise Sitools2Exception("Comparison must be one of these values : LT, GT, EQ, LIKE, IN, NOTIN")
1005681
function (val, errorMessage) {
			switch(true) {
				case typeof val == 'string': 
					return val;

				case val === undefined:
				case val === null: 
					return 'nil';
				
				case val === Infinity: 
					return 'inf';

				case val === -Infinity: 
					return '-inf';

				case typeof val == 'number': 
				case typeof val == 'boolean': 
					return window.isNaN(val)? 'nan' : '' + val;

				default: 
					return throwCoerceError(val, errorMessage) || '';
			}
		}