Skip to content

Commit 96690cf

Browse files
author
Marvin Kuhn
committed
added some validators to the comment form
1 parent b8cfff9 commit 96690cf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Resources/Private/Fusion/Form/Comment.fusion

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,25 @@ prototype(Breadlesscode.Commentable:Form.Comment) < prototype(Neos.Form.Builder:
55
elements {
66
name = Neos.Form.Builder:SingleLineText.Definition {
77
label = ${ Translation.translate('Breadlesscode.Commentable:Form.Comment:name.label') }
8+
validators {
9+
notEmpty = Neos.Form.Builder:StringLengthValidator.Definition {
10+
options.minimum = 2
11+
}
12+
}
813
}
914
email = Neos.Form.Builder:SingleLineText.Definition {
1015
label = ${ Translation.translate('Breadlesscode.Commentable:Form.Comment:email.label') }
16+
validators {
17+
isEmail = Neos.Form.Builder:EmailAddressValidator.Definition
18+
}
1119
}
1220
message = Neos.Form.Builder:MultiLineText.Definition {
1321
label = ${ Translation.translate('Breadlesscode.Commentable:Form.Comment:content.label') }
22+
validators {
23+
mimumumStringLength = Neos.Form.Builder:StringLengthValidator.Definition {
24+
options.minimum = 8
25+
}
26+
}
1427
}
1528
}
1629
}

0 commit comments

Comments
 (0)