src/definition/validator/validate.js
function getErrorLabel(type, fieldName, options = {}) {
    options = options || {};
    const translationKey = options.translationKey ? options.translationKey : `domain.validation.${type}`;
    const opts = { fieldName: translate(fieldName), ...options };
    return translate(translationKey, opts);
}
function getErrorLabel(type, fieldName, options = {}) {
    options = options || {};
    const translationKey = options.translationKey ? options.translationKey : `domain.validation.${type}`;
    const opts = { fieldName: translate(fieldName), ...options };
    return translate(translationKey, opts);
}
function getErrorLabel ( type , fieldName , options = { } ) { options = options || { } ; const translationKey = options . translationKey ? options . translationKey : ` ${ type } ` ; const opts = { fieldName : translate ( fieldName ) , ... options } ; return translate ( translationKey , opts ) ; }
Get the error label from a type and a field name.
@param  {string} type      - The type name.
@param  {string} fieldName - The field name.
@param  {object} options - The options to put such as the translationKey which could be defined in the domain.
@return {string} The formatted error.
Get the error label from a type and a field name .