Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // form validation loaded from config
- $('.ui.form').each(function(index){
- var config = $(this).data('config');
- if(config !== undefined) {
- $(this).prepend('<div class="ui icon error message" id="form-errors"></div>');
- var settings = APP.config.validation;
- config.split('.').forEach(function(el, i, arr){
- settings = settings[el];
- });
- $('#form-'+settings.id).form(
- settings.rules,
- $.extend({}, APP.config.forms.global.options, settings.options)
- );
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement