Hallo parse eine Arraylist von Validierungsfehlern und diaply das. Ich habe eine ArraylistWie analysiere ich eine Array-Liste von Fehlern und zeige sie als Validierungsfehler an
[passwordinsufficientuniquechar, passwordmaxrepeat, passwordinsufficientuniqueno, passwordnotenoughnumbers]
und ich habe die entsprechenden Meldungen in message.properties wie
passwordcontainsusername=Your new password cannot contain your user name.
passwordtooshort=Your new password must be at least 8 characters long.
passwordtoolong=Your new password cannot exceed 50 characters.
password.change.different=The new password and the confirmed password values do not match.
passwordmaxrepeat=Your new password cannot contain more than 4 instances of the same character.
passwordequalsoldpassword=Your new password cannot be a previously used password.
passwordnotenoughnumbers=Your new password must contain at least 1 number or punctuation character.
passwordnotallowedchar=Your new password contain one or more characters that are not allowed.
password.change.validateerror=The account password and the current password do not match.
passwordnotenoughchars=Your new password must contain at least 2 letters.
passwordlessthan24hours=You cannot change your password more than three times in 24 hours.
passwordinsufficientuniquechar = Your new password must contain at least 5 unique characters.
passwordinsufficientuniqueno =Your new password must contain at least 2 unique numbers (symbols count as numbers).
ich Webflow verwende. Wie also parse ich diese Nachrichten an o/p, um Nachrichten aus meiner Eigenschaftendatei anzuzeigen.
def Übersetzungen half alle Nachrichten setzen von Eigenschaften auf die object.How Datei kann ich die Übersetzung Objekt binden Objekt steuern und als Fehlermeldung ausgeben ?? –
In der Regel legen Sie Einschränkungen für Ihr Befehlsobjekt fest, und grails erzeugt beim Aufruf von validate Fehler im Befehlsobjekt. Der Befehlsklassenname wird mit dem Feldnamen und dem Einschränkungsnamen kombiniert, um den Schlüssel zu erstellen, der in messages.properties nachgeschlagen wird. – ataylor
yup, das hat funktioniert .... Ich habe vergessen, das Befehlsobjekt zu fließen. Das hat Fehler verursacht. Danke für die Antwort. –