2
I’m using a field of TextArea
with the TinyMCE
for text posting and would like to know if it is possible to add some validation so that it does not accept blank values.
I’ve tried to add the required
of HTML5
, but when I try to send the post, the field does not send and also does not display the error, whether it is filled or not.
html
<textarea type="text" name="texto"></textarea>
script tinymce
<script src="tinymce/js/tinymce/tinymce.js"></script>
<script>tinymce.init({
selector: 'textarea',
height: 245,
theme: 'modern',
plugins: [
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
'searchreplace wordcount visualblocks visualchars code fullscreen',
'insertdatetime media nonbreaking save table contextmenu directionality',
'emoticons template paste textcolor colorpicker textpattern imagetools'
],
toolbar1: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
toolbar2: 'print preview media | forecolor backcolor emoticons',
image_advtab: true,
language : "pt_BR",
forced_root_block : false,
force_br_newlines : true,
force_p_newlines : false
});
</script>
It would be possible to add the part of the code referring to what you are trying to do?
– André
You can validate via javascript
– KhaosDoctor