improve markdown readme's & and adding ability to send telegram messages to a topic in a supergroup

This commit is contained in:
orangecoding
2025-10-30 12:42:03 +01:00
parent e3c62d4696
commit db3702ed33
18 changed files with 149 additions and 68 deletions

View File

@@ -21,7 +21,7 @@ const sortAdapter = (a, b) => {
const validate = (selectedAdapter) => {
const results = [];
for (let uiElement of Object.values(selectedAdapter.fields || [])) {
if (uiElement.value == null) {
if (uiElement.value == null && !uiElement.optional) {
results.push('All fields are mandatory and must be set.');
continue;
}
@@ -36,7 +36,7 @@ const validate = (selectedAdapter) => {
results.push('A boolean field cannot be of a different type.');
continue;
}
if (typeof uiElement.value === 'string' && uiElement.value.length === 0) {
if (typeof uiElement.value === 'string' && uiElement.value.length === 0 && !uiElement.optional) {
results.push('All fields are mandatory and must be set.');
}
}