Below is the standard JS that makes sure the Subject and Message are not empty when posting a new topic. I would like it to make sure the Subject is at least 20 characters instead of just not empty. I'm very javascript challenged.
function validate(){
if (document.PostTopic.Subject) {
if (trim(document.PostTopic.Subject.value)=="") {
alert("You must enter a Subject")
return false
}
}
if (document.PostTopic.Message) {
if (trim(document.PostTopic.Message.value)=="") {
alert("You must enter a Message")
return false
}
}
document.PostTopic.Submit.disabled = true
return true
}