Common configuration options

Many of transformers don't need any configuration. You can use them just like this:

# gets a person last name
last_name: {}

If there are no specific notes in the documentation for some transformer, then there are no configuration options for it.

Locales

Also many of them support locale configuration:

# gets a person last name
last_name:
  locale: RU

Please refer here for the list of available locales.

In this document we mark such transformers with the globe symbol 🌐.

For some transformers, specifying the locale now may not have any practical effect (but it may have an effect in the future).

Uniqueness

You can specify that result values must be unique (they are not unique by default). You can use short or full syntax.

Short:

email:
  uniq: true

Full:

email:
  uniq:
    required: true
    try_count: 5

Uniqueness is ensured by re-generating values when they are same.

You can customize the number of attempts with try_count (this is an optional field, the default number of tries depends on the rule, for some rules it can be guessed automatically).

Currently, uniqueness is supported by: email, ip, phone, random_num.

In the future, we plan to add support for the uniqueness option for all transformers.