Lettersonly
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #401967
    Tilo
    Guest

    Hello Dinesh,

    since your last update it will never work
    https://dineshkarki.com.np/forums/topic/letters-only#post-377211
    Can I integrate this to “Custom Code”? An what must I do?…filled out in line “Custom Codes (1 code per line)”.

    Thanks
    Tilo

    #402445
    Dinesh
    Keymaster

    Hi Tilo,

    Is this code still there in your javascript file ?

    jQuery.validator.addMethod( "lettersonly2", function( value, element ) {
    	return this.optional( element ) || /^[a-züöäÜÖÄß-\s]+$/i.test( value );
    }, "Letters only please" );

    Or for new version, you can create a custom regEx and keep the class in your field.

    This should be the regEx pattern for your custom letters validation. ^[a-züöäÜÖÄß-\s]+$

    #402446
    Dinesh
    Keymaster

    Hi Tilo,

    Is this code still there in your javascript file ?

    jQuery.validator.addMethod( "lettersonly2", function( value, element ) {
    	return this.optional( element ) || /^[a-züöäÜÖÄß-\s]+$/i.test( value );
    }, "Letters only please" );

    Or for new version, you can create a custom regEx and keep the class in your field.

    This should be the regEx pattern for your custom letters validation. ^[a-züöäÜÖÄß-\s]+$

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Lettersonly’ is closed to new replies.