Documentation · ViewHelper reference

XSD schema file | vhs master

Random / StringViewHelper

Random: String Generator

Use either minimumLength / maximumLength or just length.

Specify the characters which can be randomized using characters.

Has built-in insurance that first character of random string is an alphabetic character (allowing safe use as DOM id for example). /

  • Tag usage example

    <v:random.string length="123" minimumLength="123" mmaximumLength="123" characters="'0123456789abcdef'">
    	<!-- tag content - may be ignored! -->
  • Inline usage example

    {v:random.string(length: 123, minimumLength: 123, mmaximumLength: 123, characters: ''0123456789abcdef'')}


Argument Description Type

Characters to use in string


Length of string to generate


Minimum length of string if random length


Minimum length of string if random length

Required attribute

Revision history

commit 0b00cb2a6080e10af645c9ec30a5b7a408d056a4
Author: Claus Due <*****>
Date:   Sat Dec 1 01:54:14 2012 +0100

    [FEATURE] Random / String ViewHelper

commit 12ee7befd09b892078031386b81a8f54bc1f5f3f
Author: Claus Due <*****>
Date:   Sun Jan 27 21:46:26 2013 +0100

    [DOC] Doc comment for Random / String ViewHelper

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <*****>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit d2e531da034976e6db1478eef5a8478595fd16fe
Author: Claus Due <*****>
Date:   Sun Jan 5 00:45:10 2014 +0100

    [TASK] Migrate to using namespace core class names

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <*****>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit 4d167912f3a64b25a8d714d7910a8612c79c5415
Author: Claus Due <*****>
Date:   Sat Oct 4 14:53:51 2014 +0200

    [BUGFIX] Random string bad length given max+min length

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to file