Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var beforeSendValidate = function (numState, nextState) {
- var mensagem = "<ul>";
- if (numState == 0 || numState == 2 || numState == 1) {
- var tipoProduto = $("[name='tipoProduto']:checked").val();
- if (campoVazio($("[name*='tx_responsavelDisponibilizacao']").val())) {
- mensagem += "<li>O campo \"Resp. Disponibilização (Responsável pelo Evento)\" é obrigatório!</li>";
- }
- if ($("input[type='checkbox'][id*='ck_aproveitamento']").is(":checked")) {
- if (campoVazio($("#nb_notaMinima").val())) {
- mensagem += "<li>O campo \"Nota Mínima\" é obrigatório!</li>";
- }
- }
- }
- if (mensagem.length > 10) {
- throw (mensagem + "</ul>");
- }
- };
- function campoVazio(params) {
- if (String(params) == "" || String(params) == null) {
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement