> For the complete documentation index, see [llms.txt](https://jsf.gitbook.io/jsf/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jsf.gitbook.io/jsf/validation/eval.md).

# Eval

### Global

| Variable or function                                        | Description          |
| ----------------------------------------------------------- | -------------------- |
| `$moment`                                                   | Moment lib.          |
| `_`                                                         | Lodash lib.          |
| `$locale: string`                                           | Example: en, sl, ... |
| `$format.currency(value: number, currency = 'EUR'): string` | Format value helper. |
| `$format.number`                                            | Format value helper. |
| `$format.date`                                              | Format value helper. |
| `$format.dateTime`                                          | Format value helper. |

### Form related

| Variable or function              | Description                                                                                                                |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| $val                              | Form value.                                                                                                                |
| $form                             | JsfBuilder (main class)                                                                                                    |
| $builder                          | Root prop builder                                                                                                          |
| $builder.handler                  | Handler builder if set                                                                                                     |
| $objects                          | Executed from `$evalObjects`                                                                                               |
| $layoutState                      |                                                                                                                            |
| $i18n                             | Translate value.                                                                                                           |
| $setValue                         | Set value on form.                                                                                                         |
| $patchValue                       | Patch value on form.                                                                                                       |
| $clipboard                        | Clipboard util.                                                                                                            |
| `$valueOf(path: string)` :new:    | Returns value of given prop. Supports sibling resolution (abstract array paths) for example: `$valueOf('a.b[].c')`         |
| `$indexOf(path: string)` :new:    | Returns index of given item. Supports sibling resolution (abstract array paths) for example: `$indexOf('a.b[].c')`         |
| `$instanceOf(path: string)` :new: | Returns instance of prop builder. Supports sibling resolution (abstract array paths) for example: `$instanceOf('a.b[].c')` |

### Form related only available inside schema

| Variable or function |   |
| -------------------- | - |
|                      |   |

### Form related only available inside layout

| Variable or function |   |
| -------------------- | - |
|                      |   |
