π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
feat: different validation for posts
Nevo David530c14356ae3
diff --git a/apps/frontend/src/components/new-launch/editor.tsx b/apps/frontend/src/components/new-launch/editor.tsxindex 5a7c92a48..f3a9fd396 100644--- a/apps/frontend/src/components/new-launch/editor.tsx+++ b/apps/frontend/src/components/new-launch/editor.tsx@@ -388,7 +388,6 @@ export const Editor: FC<{const [id] = useState(makeId(10));const newRef = useRef<any>(null);const [emojiPickerOpen, setEmojiPickerOpen] = useState(false);- const [isUploading, setIsUploading] = useState(false);const t = useT();const uppy = useUppyUploader({@@ -476,12 +475,9 @@ export const Editor: FC<{</div></div><div className="relative">- {validateChars && props.value.length < 6 && (+ {validateChars && props.value.length === 0 && pictures?.length === 0 && (<div className="px-3 text-sm bg-red-600 !text-white mb-[4px]">- {t(- 'the_post_should_be_at_least_6_characters_long',- 'The post should be at least 6 characters long'- )}+ Your post should have at least one character or one image.</div>)}<div {...getRootProps()}>diff --git a/apps/frontend/src/components/new-launch/manage.modal.tsx b/apps/frontend/src/components/new-launch/manage.modal.tsxindex ab308d703..e3f5d3fda 100644--- a/apps/frontend/src/components/new-launch/manage.modal.tsx+++ b/apps/frontend/src/components/new-launch/manage.modal.tsx@@ -144,7 +144,7 @@ export const ManageModal: FC<AddEditModalProps> = (props) => {const notEnoughChars = checkAllValid.filter((p: any) => {return p.values.some((a: any) => {return (- countCharacters(a.content, p?.integration?.identifier || '') < 6+ countCharacters(a.content, p?.integration?.identifier || '') === 0 && a.media?.length === 0);});});@@ -153,7 +153,7 @@ export const ManageModal: FC<AddEditModalProps> = (props) => {toaster.show('' +item.integration.name +- ' post is too short, it must be at least 6 characters',+ ' Your post should have at least one character or one image.','warning');setLoading(false);diff --git a/libraries/nestjs-libraries/src/dtos/posts/create.post.dto.ts b/libraries/nestjs-libraries/src/dtos/posts/create.post.dto.tsindex 4a0cc5c70..07e23d246 100644--- a/libraries/nestjs-libraries/src/dtos/posts/create.post.dto.ts+++ b/libraries/nestjs-libraries/src/dtos/posts/create.post.dto.ts@@ -38,7 +38,6 @@ export class Integration {export class PostContent {@IsDefined()@IsString()- @MinLength(6)content: string;@IsOptional()