posabsolute/jQuery-Validation-Engine — Issue #243: Access to rules list
Author: TheKrush
Created: 2012-01-11 19:54:59+00:00
State: open

I was trying to figure out a way to access the 'allRules' list so I could get the localized strings of the rules (in the case I'm doing it's using a custom DropDownList that actually has 'display:none;' on the input so validation fails to check the item and then fails to add any message in a visible location) so I was manually doing the check and then using 'showPrompt' to display the 'required' alert, and since I wanted it to match the other places the validationEngine shows it I needed access to the allRules array so I added this:

```javascript
allRules: function() {
if ($.validationEngineLanguage)
return $.validationEngineLanguage.allRules;
else
$.error("jQuery.validationEngine rules are not loaded, plz add localization files to the page");
return null;
},
```

in jquery.ValidationEngine.js

I'm not sure if that's the best (or even needed) way to access that variable if there is a better way or you planned on adding access I'd just like to know so I could remove the hack from my fork.