Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function newsValidation() {
- var status = true;
- if (($.trim($('#txtNewsname').val()) == '') || ($.trim($('#txtnewsarea').val()) == '') ||
- ($.trim($('#txtemail').val()) == '')) {
- $("#reqfield").removeClass("hidden");
- if (!ValidateEmail($("#txtemail").val())) {
- $("#emailval").removeClass("hidden");
- }
- status = false;
- }
- function ValidateEmail(email) {
- var expr = /^([w-.]+)@@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$/;
- return expr.test(email);
- }
- function newsValidation() {
- var status = true;
- if (($.trim($('#txtNewsname').val()) == '') || ($.trim($('#txtnewsarea').val()) == '') || ($.trim($('#txtemail').val()) == '')) {
- $("#reqfield").removeClass("hidden");
- status = false;
- } else if (!ValidateEmail($("#txtemail").val())) {
- $("#emailval").removeClass("hidden");
- status = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement