Tuesday, June 2, 2015

Unicode Characters Validation in JQuery, Javascript

Attached File Name (Unicode Characters) Validation in JQuery, Javascript

var InvalidFileName = true;
            var OriginalValue = ''
            $("#HTMLListItemID").empty();
            $(".txtValidationTextBox").each(function () {
                OriginalValue = $(this).val();
                if (OriginalValue != '') {
                    var rgx = /[^\u0000-\u007F]/g;
                    var temp = $(this).val().replace(rgx, ' ');
                    var tempFileName = temp.substring(0, temp.lastIndexOf('.'));
                    var FileExtension = temp.substring(temp.lastIndexOf('.'), temp.length);
                    var tempFileNameTrimmed = tempFileName.trim();
                    if (tempFileNameTrimmed != '')
                        $(this).val(tempFileNameTrimmed + FileExtension);
                    if (temp != '' && tempFileNameTrimmed == '') {
                        InvalidFileName = false;
                        $("#HTMLListItemID").append("
  • The Attachment File Name ("
  • + OriginalValue + ") is invalid.
    ");
                        }
                    }
                });
                return InvalidFileName;

    Unicode Characters Replace - Regular Expression

    Unicode Characters Replace in JQuery- Regular Expression


    $(".txtCustomerName").each(function () {
                    var rgx = /[^\u0000-\u007F]/g;
                    var temp = $(this).val().replace(rgx, ' ');
                    $(this).val(temp);
                });

    Thursday, January 7, 2010

    Greetings

    I am Nagi Setty, from Hyderabad, India. My passions are Software development and exploring new technologies, ideas, concepts and theories.


    I aim to provide you with the best materials and resources that will help you in achieving your educational goals and improving your software development skills.

    I have done my graduation from JNTU, Hyderabad in Computer Applications. Currently I am working as a Software Engineer. I have a very good command and exposure in:

    PROGRAMMING LANGUAGE: 
      - C#.NET
    DATABASE:
      - MS SQL Server
    SOFTWARE ARCHITECTURE:
      - Linq to Entity, MVVM, MVC
    SCRIPTING & DESIGNING:
      - AJAX, HTML, CSS 
    PROJECT DESIGNING:
      - UML Modeling, MS Project
    THIRD PARTY TOOLS:
      - Customize Controls – Dev Express
      - Code Optimization  – Resharper

    I am also spending my time with MS .NET Technologies forums as a Contributor and Developer to/for technically help world wide developers by sharing my thoughts and knowledge.