Configurazione dei form
Nella configurazione potete cambiare i messaggi di errore predefiniti dei form.
forms:
messages:
Equal: 'Please enter %s.'
NotEqual: 'This value should not be %s.'
Filled: 'This field is required.'
Blank: 'This field should be blank.'
MinLength: 'Please enter at least %d characters.'
MaxLength: 'Please enter no more than %d characters.'
Length: 'Please enter a value between %d and %d characters long.'
Email: 'Please enter a valid email address.'
URL: 'Please enter a valid URL.'
Integer: 'Please enter a valid integer.'
Numeric: 'Please enter a non-negative integer.'
Float: 'Please enter a valid number.'
Min: 'Please enter a value greater than or equal to %d.'
Max: 'Please enter a value less than or equal to %d.'
Range: 'Please enter a value between %d and %d.'
MaxFileSize: 'The size of the uploaded file can be up to %d bytes.'
MaxPostSize: 'The uploaded data exceeds the limit of %d bytes.'
MimeType: 'The uploaded file is not in the expected format.'
Image: 'The uploaded file must be image in format JPEG, GIF, PNG or WebP.'
Nette\Forms\Controls\SelectBox::Valid: 'Please select a valid option.'
Nette\Forms\Controls\UploadControl::Valid: 'An error occurred during file upload.'
Nette\Forms\Controls\CsrfProtection::Protection: 'Your session has expired. Please return to the home page and try again.'
Ecco la traduzione italiana:
forms:
messages:
Equal: 'Inserite %s.'
NotEqual: 'Questo valore non dovrebbe essere %s.'
Filled: 'Questo campo è obbligatorio.'
Blank: 'Questo campo dovrebbe essere vuoto.'
MinLength: 'Inserite almeno %d caratteri.'
MaxLength: 'Inserite al massimo %d caratteri.'
Length: 'Inserite un valore lungo da %d a %d caratteri.'
Email: 'Inserite un indirizzo e-mail valido.'
URL: 'Inserite un URL valido.'
Integer: 'Inserite un numero intero valido.'
Numeric: 'Inserite un numero intero non negativo.'
Float: 'Inserite un numero valido.'
Min: 'Inserite un valore maggiore o uguale a %d.'
Max: 'Inserite un valore minore o uguale a %d.'
Range: 'Inserite un valore compreso tra %d e %d.'
MaxFileSize: 'La dimensione del file caricato può essere al massimo di %d byte.'
MaxPostSize: 'I dati caricati superano il limite di %d byte.'
MimeType: 'Il file caricato non è nel formato atteso.'
Image: 'Il file caricato deve essere un''immagine in formato JPEG, GIF, PNG o WebP.'
Nette\Forms\Controls\SelectBox::Valid: 'Selezionate un''opzione valida.'
Nette\Forms\Controls\UploadControl::Valid: 'Si è verificato un errore durante il caricamento del file.'
Nette\Forms\Controls\CsrfProtection::Protection: 'La vostra sessione è scaduta. Tornate alla home page e riprovate.'
Se non usate l'intero framework e quindi nemmeno i file di configurazione, potete cambiare i messaggi di errore predefiniti
direttamente nell'array Nette\Forms\Validator::$messages.