References
summary | ||
public |
JediValidate - validation |
i18n
summary | ||
public |
Dictionary for translation |
lib
summary | ||
public |
Sending request |
|
public |
F convertData(data: object, type: string, FileListType: function, FormDataType: function): string | FormData Convert data object to a value for sending |
|
public |
F convertNameToPath(name: string): Array Convert input name to path array |
|
public |
Create query portion of url for serialize method |
|
public |
Merge literal object deeply and concat arrays |
|
public |
F createObject(path: Array, value: string | FileList): object Create object by path and value |
|
public |
Get data object with values from inputs object |
|
public |
F getInputData(input: HTMLInputElement | Array): object Get input value as an object keyed by input name |
|
public |
F getInputName(input: HTMLInputElement | Array): string Get name from input or array of inputs |
|
public |
F getInputValue(input: Element | HTMLInputElement | HTMLSelectElement | Array): string | Date | FileList | Array Get form input value |
|
public |
F getRadioGroupValue(inputs: Array): string | Array<string> Get value from radio group |
|
public |
F getValueByName(name: string, data: object): * Get value from data object by name |
|
public |
F getValueByPath(path: Array, data: object): string Get value from data object by path |
|
public |
F getFormOptions(form: HTMLFormElement): {ajax: {url: string, method: string, enctype: string, sendType: *}} Get ajax options from form |
|
public |
F getInputRules(input: HTMLInputElement | HTMLSelectElement): object Get validatation options from input attribute of className |
|
public |
Check value is an email |
|
public |
Check file extensions |
|
public |
Check file sizes are less than max |
|
public |
Check value is less than max number |
|
public |
Check date is less than max date |
|
public |
Check value is greater than min number |
|
public |
Check value is greater than min date |
|
public |
Test RegExp |
|
public |
Check value is not empty |
|
public |
Check value is multiple of number |
|
public |
Check value is phone number |
|
public |
Check value is url |
|
private |
F initErrorMessages(rules: object, messages: object, methods: object): Object<string, Object<string, string>> Init error messages |
|
private |
Mark field as invalid |
|
private |
F markField(field: Element, message: *, states: *, errors: *) Mark field |
|
private |
Mark field as valid |
|
public |
F isCheckable(params: *, data: object): * Check rule for dependencies |
|
public |
F validateData(rules: object, methods: object, data: object, errorMessages: object, translate: function): object<string, Array<string>> Validate data object |
|
public |
F validateField(rules: object, methods: object, value: string | FileList | Array, name: string, errorMessages: object, data: object, translate: function): Array<string> Validate field |