Returns a collection of invalid fields, if any.
772155
private Set<String> detectInvalidFields(
            final String name, final String fname, final Map<String, String> attributes) {
        final Set<String> rslt = new HashSet<>();

        // Name & Fname
        try {
            tenantService.validateName(name);
            // Fname is generated from name;  the only way to
            // fix an invalid fname is to change the name.
            tenantService.validateFname(fname);
        } catch (Exception e) {
            log.warn("Validation failure for tenant name={}", name, e);
            rslt.add("name");
        }

        // Attributes
        for (String attributeName : tenantManagerAttributes.keySet()) {
            try {
                final String value = attributes.get(attributeName);
                tenantService.validateAttribute(attributeName, value);
            } catch (Exception e) {
                log.warn("Validation failure for tenant name={}", name, e);
                rslt.add(attributeName);
            }
        }

        return rslt;
    }
107451
public function getInvalidRules($field = null)
    {
        return $field ?
            isset($this->invalidRules[$field]) ? $this->invalidRules[$field] : array()
            : $this->invalidRules;
    }
768650
public function getValidationErrors()
    {
        $fields = $this->getFields();
        if (!$fields) {
            return [];
        }

        $result = [];
        foreach ($fields as $field) {
            if ($field instanceof AbstractFormField) {
                if (!$field->isValid()) {
                    $result = array_merge($result, $field->getErrorMessages());
                }
            }
        }

        return $result;
    }
668385
public function getInvalidOrMissingErrors()
    {
        $all = $this->invalidAttribs + $this->missingAttribs;
        return array_combine(
            array_keys($all),
            array_map(function ($ref) {
                return $ref['error'];
            }, array_values($all))
        );
    }
888987
def list_invalid_properties
      invalid_properties = []
      if @style.nil?
        invalid_properties.push("invalid value for 'style', style cannot be nil.")
      end

      if @transparency.nil?
        invalid_properties.push("invalid value for 'transparency', transparency cannot be nil.")
      end

      if @weight.nil?
        invalid_properties.push("invalid value for 'weight', weight cannot be nil.")
      end

      return invalid_properties
    end
457692
def find_invalid_venues(all_items):
    """"""
    venues = {}
    for item in all_items:
        valid = False
        item_days = list(item.venue.days.all())
        for slot in item.slots.all():
            for day in item_days:
                if day == slot.get_day():
                    valid = True
                    break
        if not valid:
            venues.setdefault(item.venue, [])
            venues[item.venue].append(item)
    return venues.items()
1101139
def _validated(self, values):
        """"""
        if self.length != len(values):
            raise NotValid(
                "%r does not have exactly %d values. (Got %d.)" % (
                    values, self.length, len(values)))
        return type(self.schemas)(
            self.schemas[i].validate(v) for i, v in enumerate(values))
722605
public List<FieldError> getFieldErrors() {
        return errors.stream()
                .filter(e -> e instanceof FieldError)
                .map(e -> (FieldError)e)
                .collect(Collectors.toList());
        
    }
639431
public function listInvalidProperties()
    {
        $invalidProperties = [];

        if (!is_null($this->container['unreadCount']) && ($this->container['unreadCount'] < 0)) {
            $invalidProperties[] = "invalid value for 'unreadCount', must be bigger than or equal to 0.";
        }

        if (!is_null($this->container['labelId']) && ($this->container['labelId'] < 0)) {
            $invalidProperties[] = "invalid value for 'labelId', must be bigger than or equal to 0.";
        }

        if (!is_null($this->container['name']) && (strlen($this->container['name']) > 40)) {
            $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 40.";
        }

        $allowedValues = $this->getColorAllowableValues();
        if (!in_array($this->container['color'], $allowedValues)) {
            $invalidProperties[] = sprintf(
                "invalid value for 'color', must be one of '%s'",
                implode("', '", $allowedValues)
            );
        }

        return $invalidProperties;
    }
410006
def all_required_fields(self):
        
        def required_check(f):
            return not is_nullable_type(f.data_type) and not f.has_default
        return self._filter_fields(required_check)
997140
function findRequiredFieldsProps(requiredFields){
	return requiredFields.map((item) => {
		return { 
			props: findValueOfChildren(item.value, item.fieldToBeValidated), 
			...item 
		};
	});
}
183129
public function validate(Collection $collection = null)
    {
        $this->errors = [];
        foreach ($this->getValuesAsArray() as $index => $value) {
            # skip fields with a null value if they are not required
            if ($value === null && $this->hasRule(Rule::REQUIRED) === false) {
                continue;
            }

            foreach ($this->rules as $name => $rule) {
                $rule->setValue($value);
                $rule->setField($this, $index);
                $rule->setCollection($collection);
                if ($rule->validate() === true) {
                    $fmtValue = $rule->getValue();
                    if ($fmtValue !== $value) {
                        $value = $fmtValue;
                        $this->setValue($fmtValue, $index);
                    }
                }
                else {
                    $this->errors[] = $rule->getError();
                    break;
                }
            }
        }
        return count($this->errors) === 0;
    }
37350
def validate(self) :
        """"""
        if not self.mustValidate :
            return True

        res = {}
        for field in self.validators.keys() :
            try :
                if isinstance(self.validators[field], dict) and field not in self.store :
                    self.store[field] = DocumentStore(self.collection, validators = self.validators[field], initDct = {}, subStore=True, validateInit=self.validateInit)
                self.validateField(field)
            except InvalidDocument as e :
                res.update(e.errors)
            except (ValidationError, SchemaViolation) as e:
                res[field] = str(e)

        if len(res) > 0 :
            raise InvalidDocument(res)
        
        return True
579696
public function getInvalidField($field)
    {
        $value = isset($this->_invalid[$field]) ? $this->_invalid[$field] : null;

        return $value;
    }
666927
def _check_values(self, value):
        
        key = self.to_field_name or 'pk'
        # deduplicate given values to avoid creating many querysets or
        # requiring the database backend deduplicate efficiently.
        try:
            value = frozenset(value)
        except TypeError:
            # list of lists isn't hashable, for example
            raise ValidationError(
                self.error_messages['list'],
                code='list',
            )
        for pk in value:
            try:
                self.queryset.filter(**{key: pk})
            except (ValueError, TypeError):
                raise ValidationError(
                    self.error_messages['invalid_pk_value'],
                    code='invalid_pk_value',
                    params={'pk': pk},
                )
        qs = EventOccurrence.objects.filter(**{'%s__in' % key: value})
        pks = set(force_text(getattr(o, key)) for o in qs)
        for val in value:
            if force_text(val) not in pks:
                raise ValidationError(
                    self.error_messages['invalid_choice'],
                    code='invalid_choice',
                    params={'value': val},
                )
        return qs
1324499
function( e ) {
      var self = this, // stored this
          invalidFields = [];
      // Make invalidFields accessible
      this.getInvalidFields = function(){
        return invalidFields;
      }
      for ( var i = 0, _lengthFields = FIELDS.length; i < _lengthFields; i++ ) {
        // if field is disabled, do not check
        if ( FIELDS[ i ].disabled ) continue;
        var el = FIELDS[ i ], //current field
          errors = '', //current field's errors
          val = trim ( $( el ).val() ), //current field's value
          methods = el.getAttribute('data-validetta').split(','), //current field's control methods
          state; // Validation state
        // Create tmp
        this.tmp = {};
        // store el and val variables in tmp
        this.tmp = { el : el, val : val, parent : this.parents( el ) };
        // Start to check fields
        // Validator : Fields Control Object
        for ( var j = 0, _lengthMethods = methods.length; j < _lengthMethods; j++ ) {
          // Check Rule
          var rule = methods[ j ].match( RRULE ),
            method;
          // Does it have rule?
          if( rule !== null ) {
            // Does it have any argument ?
            if( typeof rule[2] !== 'undefined' ) this.tmp.arg = rule[2];
            // Set method name
            method = rule[1];
          } else { method = methods[ j ]; }
          // prevent empty validation if method is not required
          if ( val === '' && method !== 'required' && method !== 'equalTo' ) continue;
          // Is there a methot in Validator ?
          if( Validator.hasOwnProperty( method ) ) {
            // Validator returns error message if method invalid
            state = Validator[ method ]( self.tmp, self );
            if ( typeof state !== 'undefined' && state !== true ) {
              var _dataMsg = el.getAttribute( 'data-vd-message-' + method );
              if ( _dataMsg !== null ) state = _dataMsg;
              errors += state +'<br/>';
            }
          }
        }
        // Check the errors
        if( errors !== '' ) {
          invalidFields.push({
            field: el,
            errors: errors
          });
          // if parent element has valid class, remove and add error class
          this.addErrorClass( this.tmp.parent );
          // open error window
          this.window.open.call( this , el, errors );
        // Check remote validation
        } else if ( typeof this.tmp.remote !== 'undefined' ) {
          this.checkRemote( el, e );
        } else { // Nice, there are no error
          if( typeof state !== 'undefined' ) this.addValidClass( this.tmp.parent );
          else $( this.tmp.parent ).removeClass( this.options.errorClass +' '+ this.options.validClass );
          state = undefined; // Reset state variable
        }
      }
    }
1192400
public function getInvalidErrors()
    {
        return array_combine(
            array_keys($this->invalidAttribs),
            array_map(function ($ref) {
                return $ref['error'];
            }, array_values($this->invalidAttribs))
        );
    }