function formValidation(id) {
  $('#validation-results').find('img').attr('src', '/app/ui/images/illustrations/no_access_2.svg');
  $('#validation-results').find('h2').html('');
  $('#validation-results').find('div').html('');
  $(id).attr('aria-invalid','0');
  $(id).find('input').each(function(index) {
    $(this).parents('.slds-form-element').removeClass('slds-has-error');
    $(this).parents('.slds-form-element').find('.slds-form-element__help').addClass('slds-hide');
    if($(this).val()=="" || $(this).val()==null) {
      $(this).parents('.slds-form-element').addClass('slds-has-error');
      $(this).parents('.slds-form-element').find('.slds-form-element__help').removeClass('slds-hide');
      $(id).attr('aria-invalid','1');
    }
  });
}
// Check that all form fields are correct ==================================
Check that all form fields are correct
Check that all form fields are correct
function formValidation(id) {
  $('#validation-results').find('img').attr('src', '/app/ui/images/illustrations/no_access_2.svg');
  $('#validation-results').find('h2').html('');
  $('#validation-results').find('div').html('');
  $(id).attr('aria-invalid','0');
  $(id).find('input').each(function(index) {
    $(this).parents('.slds-form-element').removeClass('slds-has-error');
    $(this).parents('.slds-form-element').find('.slds-form-element__help').addClass('slds-hide');
    if($(this).val()=="" || $(this).val()==null) {
      $(this).parents('.slds-form-element').addClass('slds-has-error');
      $(this).parents('.slds-form-element').find('.slds-form-element__help').removeClass('slds-hide');
      $(id).attr('aria-invalid','1');
    }
  });
}
function formValidation ( id ) { $ ( '#validation-results' ) . find ( 'img' ) . attr ( 'src' , '/app/ui/images/illustrations/no_access_2.svg' ) ; $ ( '#validation-results' ) . find ( 'h2' ) . html ( '' ) ; $ ( '#validation-results' ) . find ( 'div' ) . html ( '' ) ; $ ( id ) . attr ( 'aria-invalid' , '0' ) ; $ ( id ) . find ( 'input' ) . each ( function ( index ) { $ ( this ) . parents ( '.slds-form-element' ) . removeClass ( 'slds-has-error' ) ; $ ( this ) . parents ( '.slds-form-element' ) . find ( '.slds-form-element__help' ) . addClass ( 'slds-hide' ) ; if ( $ ( this ) . val ( ) == "" || $ ( this ) . val ( ) == null ) { $ ( this ) . parents ( '.slds-form-element' ) . addClass ( 'slds-has-error' ) ; $ ( this ) . parents ( '.slds-form-element' ) . find ( '.slds-form-element__help' ) . removeClass ( 'slds-hide' ) ; $ ( id ) . attr ( 'aria-invalid' , '1' ) ; } } ) ; }
Check that all form fields are correct
Check that all form fields are correct