Warnings on a dialog

What will be the optional solution for the following use case: A dialog is opened on the screen, when clicking on an action button to send the dialog (after filling in details), in some cases a warning should appear. The user can either accept the warning and send the data or make changes in the dialog and send it again. Where, ideally, I will place the warnings? Should I have a toggle button?

Thanks, May