ActiveStorage File Attachment Validation

Is there a way to validate attachments with ActiveStorage? For example, if I want to validate the content type or the file size? Something like Paperclip's approach would be great!