S
S
Salavat Sharapov2015-02-26 15:11:34
Django
Salavat Sharapov, 2015-02-26 15:11:34

How to validate a Textarea with an editor?

People!
How do you validate fields to which editors are attached?
Because editors, if you just put a space, automatically create tags like p or br, and some even stamp them right away.
AP: Validation means mandatory.
Write regular expression in custom clean? Or are there solutions in JS (if we talk about validation on the client), or can janga do it itself?
Thank you for your responses.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rmaksim, 2015-02-27
@rmaksim

take the value of the editor,
insert it into a div,
take the text of the div - this is if the tags do not need to be taken into account
, validate to the desired value,
for example, like this jsfiddle.net/nqgrneur

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question