# How to validate a post before publishing with the DunSocial CLI > dun posts validate runs the same character-limit & platform-metadata checks as schedule or publish, creates nothing, & reports valid plus issues. Reddit accounts get an additional live flair & rules check afterwards. Updated: 2026-10-05. ## What validation does `dun posts validate` is a dry run. It calls the same endpoint the API uses for validation & applies the same character-limit & platform-metadata checks as scheduling or publishing, but writes nothing & queues nothing. ## The command ```bash dun posts validate \ --text "Shipping something small today." \ --accounts ACCOUNT_ID \ --json ``` It takes the same flags you'd use to schedule, minus the time. That means a post that validates can be sent unchanged to `schedule` or `publish`. ## Reading the result The output includes `valid` & a list of `issues`. Each issue names the account, the platform, a code & a message, such as a post that exceeds X's 280-character limit by three characters. Fix what the message says, then run it again. In a script, exit code 4 signals a validation failure. ## Platform options with --meta When the accounts include Reddit, Instagram, Pinterest, TikTok, Discord or Slack, pass the required options as JSON: ```bash dun posts validate \ --accounts INSTAGRAM_ACCOUNT_ID \ --media ASSET_ID \ --meta '{"instagram":{"format":"carousel"}}' \ --json ``` Instagram needs a `format`: `feed_image`, `carousel`, `reel` or `story`. There's no default, so a missing format is reported rather than guessed. Discord needs a `channelId` from `dun discord channels`, & Slack needs one from `dun slack channels`. DunSocial's validation names the platform & the missing option, so you know which block to complete. ## The extra Reddit check For Reddit accounts, validation does two things. First it runs the API's character & metadata checks. Then it checks the live subreddit rules & flair requirements. That second step is why validating before a Reddit post is worth the few seconds: a subreddit that requires flair will reject a post without it. DunSocial adds this step only for Reddit accounts, so validation for other platforms stays quick. ## Use it in a script ```bash dun posts validate --accounts ACCOUNT_ID --text "$TEXT" --json \ && dun posts schedule --accounts ACCOUNT_ID --text "$TEXT" --in 1h ``` If validation fails, the command exits non-zero & the schedule step never runs. That's the whole point: failures show up before anything is queued. DunSocial's exit code 4 makes the `&&` chain stop cleanly on a validation failure. ## What it can't catch Validation checks rules, not quality. It can't tell you the post is accurate, on-brand or well timed. DunSocial's calendar is where a person reviews those before the post goes out. ## Related guides - [How to schedule a post with the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-schedule-a-post-with-the-dunsocial-cli.md) - [How to post to Reddit from the command line](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-post-to-reddit-from-the-command-line.md) - [How to validate a social post before scheduling it with the API](https://www.dunsocial.com/hub/dunsocial-api-and-sdk-guides/how-to-validate-a-social-post-before-scheduling-it-with-the-api.md) - [What happens if a scheduled post fails?](https://www.dunsocial.com/hub/social-media-scheduler/what-happens-if-a-scheduled-post-fails.md) ## About this document This is the Markdown representation of https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-validate-a-post-before-publishing-with-the-dunsocial-cli. The HTML version of the same page is at the same URL. You can also request Markdown from any page by sending `Accept: text/markdown`. Machine-readable summary of the whole site: https://www.dunsocial.com/llms.txt ## Company - Product: DunSocial, https://www.dunsocial.com - Legal entity: THISUX PRIVATE LIMITED, Chennai, Tamil Nadu, India - Support: support@dunsocial.com - Open the app: https://app.dunsocial.com/login