Skip to content

Wrong db name validation #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hololoev opened this issue Dec 14, 2024 · 0 comments
Open

Wrong db name validation #291

hololoev opened this issue Dec 14, 2024 · 0 comments

Comments

@hololoev
Copy link

Hello guys.

Now we have a schema:

const option = Joi.object().keys({
    name: Joi.string().token().required(),
    models: Joi.alternatives().try(Joi.string(), Joi.array().items(Joi.string())),
    ignoredModels: Joi.alternatives().try(Joi.string(), Joi.array().items(Joi.string())),
    sequelize: Joi.object().instance(Sequelize).required(),
    sync: Joi.boolean().default(false),
    forceSync: Joi.boolean().default(false),
    debug: Joi.boolean(),
    onConnect: Joi.func(),
});

Name 'must only contain alpha-numeric and underscore characters', but at least "-" is valid character for db name, for example "ololo-dbname" is valid for mysql.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant