Display error message.
error(msg)

msg | string, error message

Returns undefined.

#### Description

This method displays error message and will emits .onError event.
If you have following form: $('#form').w2form({ name : 'form', formURL : '/server/path', fields: [ { name: 'first_name', type: 'text', required: true }, { name: 'last_name', type: 'text', required: true }, { name: 'email', type: 'email' } ] }); You can w2ui['form'].error('Some error.');