Share

WSValidations

The results generated by the validation of a network, for example from the WSOpenNetwork.validate method.

It is a collection of WSValidation objects, which each represent a validation message that would appear in the user interface.

All methods in this class are read only.

Methods:

[] (Get Index)

#[(index)] ⇒ WSValidation?

EXCHANGE, UI

Returns the object from the collection at the specified index.

Parameters

Name Type(s) Description
index Integer The index requested (zero-based).
Return WSValidation, nil The object found, or nil if there is no object at this index.

each

#each { |v| ...} ⇒ WSValidation

EXCHANGE, UI

Iterates through the collection, yielding a WSValidation object.

Examples

validations.each { |v| puts v.message }
validations.each do |v|
  puts v.message
end

error_count

#error_count ⇒ Integer

EXCHANGE, UI

Returns the number of errors found during validation.

length

#length ⇒ Integer

EXCHANGE, UI

Returns the number of validation messages.

warning_count

#warning_count ⇒ Integer

EXCHANGE, UI

Returns the number of warnings found during validation.

Was this information helpful?