Commit a9282ba815833e0073b5c7cd7e75f6899f7df2e8
- Diff rendering mode:
- inline
- side by side
README
(4 / 0)
|   | |||
| 39 | 39 | Please do not name another method as validator_hooks or name a method starting | |
| 40 | 40 | with validator_, this might conflict with some methods in the plugin. | |
| 41 | 41 | ||
| 42 | If you have a runtime determined regex, eg length{x} and a standard predefined regex, | ||
| 43 | e.g required, the standard predefined should come first in the title, this is just | ||
| 44 | a good practice, any arrangement will also work as well. eg | ||
| 45 | <input type="text" name="fred" id="fred" title="required email length{6}" /> | ||
| 42 | 46 | ||
| 43 | 47 | ||
| 44 | 48 | NOTE |
validator.js
(2 / 1)
|   | |||
| 36 | 36 | forms = document.forms; | |
| 37 | 37 | for(i=0; i < forms.length; i++) { | |
| 38 | 38 | thisForm = forms[i]; | |
| 39 | Event.observe(forms[i].id, "submit", obj.validate_form) | ||
| 39 | if(thisForm.id != "") | ||
| 40 | Event.observe(forms[i].id, "submit", obj.validate_form) | ||
| 40 | 41 | } | |
| 41 | 42 | }); | |
| 42 | 43 |

