to prevent only white spase in input
to prevent only white spase in input
azonekz@gmail.com
Posts: 32Questions: 9Answers: 1
Hi!
I can't find solution how to to prevent only white space in input
I found:
.Field(
new Field("groupes.grp_nom")
.Validator(DataTables.Validation.Required(new ValidationOpts
{
Empty = false,
Message = "Champs obligatoires"
})))
But it accept ONLY white space.
Thanks in advance
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I'm not entirely certain what you mean by white space in this case. Do you mean an empty value or space/tab/new line etc (which is what the term "white space" normally refers to in this context).
Allan
I mean the whitespace character
You would need to use a custom validator for that as the built in validation doesn't have an option to reject only whitespace characters.
Allan
Yes, it working great like that:
Thanks Allan