RocketChat / Rocket.Chat.Apps-engine

The Rocket.Chat Apps engine and definitions.

Home Page:https://rocketchat.github.io/Rocket.Chat.Apps-engine/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom settings validation

cuonghuunguyen opened this issue · comments

I see we already have types of settings and also an exception when the user doesn't enter the required fields.

Do you guys think if it is good to have an IPreSettingChangePrevent implementation to perform custom validation?

Some examples about this implementation usage:

  • Check validity of credentials, API key, etc provided
  • Check validity of multiple fields dependency, the conflict between fields
  • Check validity of fields that requires calculation: Regex, negative/positive number, code, etc.

Since the wrong settings can break the app, those custom validation logic could become very useful

Closed by #417