---
title: isContentValid()
framework: social
role: symbol
role_heading: Instance Method
path: social/slcomposeserviceviewcontroller/iscontentvalid()
---

# isContentValid()

A Boolean value that indicates whether the current content and attachments are valid.

## Declaration

```swift
func isContentValid() -> Bool
```

## Return Value

Return Value true if the current content and attachments are valid for posting, otherwise false. The default return value is true.

## Discussion

Discussion This method is automatically called after each change a user makes to the text in the compose view. You can use this method to determine whether the Post button should be enabled and to update charactersRemaining, if necessary. A subclass should implement this method to perform custom validation of the user’s content before initiating a post.

## See Also

### Validating Content

- [charactersRemaining](social/slcomposeserviceviewcontroller/charactersremaining.md)
- [validateContent()](social/slcomposeserviceviewcontroller/validatecontent().md)
