I am something new in web programming and with Regular Expressions (RegEX) . How to allow my TextArea to accept any character except these $%&|<>#
?
I'm trying this with my TMForm.js .
regula.custom({
name:'Special'
,validator:function(){
return /^[A-Za-z ]-[$%&|<>#]?$/.test(this.value)
}
})
This is my textarea in my php file.
<label class="message">
<textarea id="message" class="input" name="cf_message" placeholder="Insert your message:" data-constraints="@Required @Special">
</textarea>
<span class="empty-message">*This field is required.</span>
<span class="error-message">*Must have at least 5 characters.</span>
</label>