DEMOS / Dynamically Removing Validation

Due to the heavily dynamic nature of Nitrogen, we provide a convenient mechanism for deactivating validators that have been added to form controls. Without this functionality, you're bound to run into javascript errors when form fields get dynamically removed from the page that have previously had validators added to them.

The form to the right initially requires entering some text into the 'name' field and the dropdown box. However, you can use the buttons to disable individual validators, or disable all validators, as well as providing a method for re-attaching the validators after they've been removed

View Module Source

Copyright © 2008-2024 Nitrogen Web Framework. Released under the MIT License.