# vim: ts=3 sw=3 et ft=org
#+TITLE: Clear Validation Action Element
#+STYLE: <LINK href='../stylesheet.css' rel='stylesheet' type='text/css' />
#+AUTHOR: Jesse Gumm (@jessegumm)
#+OPTIONS:   H:2 num:1 toc:1 \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+EMAIL: 
#+TEXT: [[file:../index.org][Getting Started]] | [[file:../api.org][API]] | [[file:../elements.org][Elements]] | [[file:../actions.org][*Actions*]] | [[file:../validators.org][Validators]] | [[file:../handlers.org][Handlers]] | [[file:../config.org][Configuration Options]] | [[file:../about.org][About]]

* Clear Validation Action - #clear_validation {}

This action tells Nitrogen to remove the validation requirements from the page.
It can remove validators en masse.

** Usage

#+BEGIN_SRC erlang
   wf:wire(#clear_validation{ validation_trigger = my_button }).
#+END_SRC

** Attributes

   + validation_target - (/Nitrogen ID/) :: Validation target is the ID of the
field (textbox, dropdown, etc) that's being validated. Set this to remove
validations from specific form fields (ie, fields that are being removed during
postbacks).

   + validation_trigger - (/Nitrogen ID/) :: Validation target is the ID of the
element initiating the validation (ie #button{} or #link{} elements). Set this
to have all validations triggered by that element removed.

   + validation_all - (/Nitrogen ID/) :: This is the nuclear option for
removing validation. Set this to any Nitrogen element to have any validations
connected to this element removed, either if this element is the trigger or if
this element is the target.

** Wiping all validations from the page

This element can also be used to wipe all validations from all elements on the
page.  This is done by simply leaving the above three fields blank (or setting
them to =undefined=).

For example:

#+BEGIN_SRC erlang
   wf:wire(#clear_validation{}). %% Wipe out all validation on the page
#+END_SRC


** See Also

   + [[./base.html][base action]]

   + [[./validate.html][validate action]]
