# Global

##

### Methods

#### callback(model)

Callback for the MODEL_BUILT event that is responsible for invoking aspect weaver and pairing validation functions with respective events.

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | Model | model on which the event was fired

Source:
  - callbacks/ModelBuilt.js, line 15

#### callback(model, htmlElement)

Callback for FORM_RENDERED event. This is used to add callback for individual attributes and model to properly render feedback messages.

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | Model | model on which the event was fired
`htmlElement` |  | html element of the model

Source:
  - callbacks/FormRendered.js, line 12

#### callback(model)

Callback for event FORM_SUBMITTED/MODEL_VALIDATED, which is responsible for triggering model related rules and firing respective events.

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | Model | form rich model

Source:
  - callbacks/FormSubmitted.js, line 10

#### callback(attr, htmlElement)

Callback for event ATTRIBUTE_VALIDATED - renders all errors and info messages for given field

##### Parameters:

Name | Type | Description
--- | --- | ---
`attr` | Attribute | attribute on which the event was fired
`htmlElement` |  | html element of the attribute

Source:
  - callbacks/AttributeValidated.js, line 9

#### renderFeedback(model, formLabel)

Callback for event FORM_SUBMITTED/MODEL_VALIDATED, which is responsible for rendering feedback.

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | Model | model on which the event was fired
`formLabel` |  | html element of the model

Source:
  - callbacks/FormSubmitted.js, line 22

#### setPending(model)

Updates model state on form submit before validation.

##### Parameters:

Name | Type | Description
--- | --- | ---
`model` | Model | model instance

Source:
  - callbacks/FormSubmitted.js, line 43