2015-02-06 04:39:52 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<?php
							 | 
						
					
						
							
								
									
										
										
										
											2018-04-28 10:29:31 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-12-10 09:02:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/**
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * validation.php
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-25 06:08:56 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 * Copyright (c) 2019 james@firefly-iii.org
							 | 
						
					
						
							
								
									
										
										
										
											2017-12-10 09:02:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 *
							 | 
						
					
						
							
								
									
										
										
										
											2019-10-02 06:43:38 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 * This file is part of Firefly III (https://github.com/firefly-iii).
							 | 
						
					
						
							
								
									
										
										
										
											2017-12-10 09:02:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 *
							 | 
						
					
						
							
								
									
										
										
										
											2019-10-02 06:43:38 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 * This program is free software: you can redistribute it and/or modify
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * it under the terms of the GNU Affero General Public License as
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * published by the Free Software Foundation, either version 3 of the
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * License, or (at your option) any later version.
							 | 
						
					
						
							
								
									
										
										
										
											2017-12-10 09:02:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 *
							 | 
						
					
						
							
								
									
										
										
										
											2019-10-02 06:43:38 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 * This program is distributed in the hope that it will be useful,
							 | 
						
					
						
							
								
									
										
										
										
											2017-12-10 09:02:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 * but WITHOUT ANY WARRANTY; without even the implied warranty of
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
							 | 
						
					
						
							
								
									
										
										
										
											2019-10-02 06:43:38 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 * GNU Affero General Public License for more details.
							 | 
						
					
						
							
								
									
										
										
										
											2017-12-10 09:02:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 *
							 | 
						
					
						
							
								
									
										
										
										
											2019-10-02 06:43:38 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 * You should have received a copy of the GNU Affero General Public License
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
							 | 
						
					
						
							
								
									
										
										
										
											2017-12-10 09:02:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 */
							 | 
						
					
						
							
								
									
										
										
										
											2017-12-19 19:25:50 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2018-05-11 10:08:34 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								declare(strict_types=1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-02-06 04:39:52 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								return [
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-10 18:43:21 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'missing_where'                  => 'Array is missing "where"-clause',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'missing_update'                 => 'Array is missing "update"-clause',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'invalid_where_key'              => 'JSON contains an invalid key for the "where"-clause',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'invalid_update_key'             => 'JSON contains an invalid key for the "update"-clause',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'invalid_query_data'             => 'There is invalid data in the %s:%s field of your query.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'invalid_query_account_type'     => 'Your query contains accounts of different types, which is not allowed.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'invalid_query_currency'         => 'Your query contains accounts that have different currency settings, which is not allowed.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-11 06:41:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'iban'                           => 'This is not a valid IBAN.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-10-17 06:06:36 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'zero_or_more'                   => 'The value cannot be negative.',
							 | 
						
					
						
							
								
									
										
										
										
											2019-02-08 07:14:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'date_or_time'                   => 'The value must be a valid date or time value (ISO 8601).',
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-30 06:16:09 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'source_equals_destination'      => 'The source account equals the destination account.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-11 06:41:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'unique_account_number_for_user' => 'It looks like this account number is already in use.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-26 21:09:33 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'unique_iban_for_user'           => 'It looks like this IBAN is already in use.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-12-12 15:27:56 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'deleted_user'                   => 'Due to security constraints, you cannot register using this email address.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-11 06:41:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'rule_trigger_value'             => 'This value is invalid for the selected trigger.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'rule_action_value'              => 'This value is invalid for the selected action.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'file_already_attached'          => 'Uploaded file ":name" is already attached to this object.',
							 | 
						
					
						
							
								
									
										
										
										
											2019-03-31 13:36:49 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'file_attached'                  => 'Successfully uploaded file ":name".',
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-16 15:17:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'must_exist'                     => 'The ID in field :attribute does not exist in the database.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-20 18:03:02 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'all_accounts_equal'             => 'All accounts in this field must be equal.',
							 | 
						
					
						
							
								
									
										
										
										
											2019-03-31 13:36:49 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'group_title_mandatory'          => 'A group title is mandatory when there is more than one transaction.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'transaction_types_equal'        => 'All splits must be of the same type.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'invalid_transaction_type'       => 'Invalid transaction type.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-30 06:16:09 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'invalid_selection'              => 'Your selection is invalid.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-16 15:17:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'belongs_user'                   => 'This value is invalid for this field.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'at_least_one_transaction'       => 'Need at least one transaction.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-29 19:27:07 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'at_least_one_repetition'        => 'Need at least one repetition.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-02 20:02:20 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'require_repeat_until'           => 'Require either a number of repetitions, or an end date (repeat_until). Not both.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-16 15:17:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'require_currency_info'          => 'The content of this field is invalid without currency information.',
							 | 
						
					
						
							
								
									
										
										
										
											2019-10-26 07:49:36 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'not_transfer_account'           => 'This account is not an account that can be used for transfers.',
							 | 
						
					
						
							
								
									
										
										
										
											2019-04-16 16:20:46 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'require_currency_amount'        => 'The content of this field is invalid without foreign amount information.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-26 13:18:34 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'equal_description'              => 'Transaction description should not equal global description.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-11 06:41:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'file_invalid_mime'              => 'File ":name" is of type ":mime" which is not accepted as a new upload.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'file_too_large'                 => 'File ":name" is too large.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-30 06:16:09 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'belongs_to_user'                => 'The value of :attribute is unknown.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-03 10:24:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'accepted'                       => 'The :attribute must be accepted.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-11-28 18:55:56 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'bic'                            => 'This is not a valid BIC.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-03 17:48:26 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'at_least_one_trigger'           => 'Rule must have at least one trigger.',
							 | 
						
					
						
							
								
									
										
										
										
											2022-02-07 09:42:23 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'at_least_one_active_trigger'    => 'Rule must have at least one active trigger.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-03 17:48:26 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'at_least_one_action'            => 'Rule must have at least one action.',
							 | 
						
					
						
							
								
									
										
										
										
											2022-02-07 09:42:23 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'at_least_one_active_action'     => 'Rule must have at least one active action.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-24 06:51:22 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'base64'                         => 'This is not valid base64 encoded data.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'model_id_invalid'               => 'The given ID seems invalid for this model.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-22 08:36:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'less'                           => ':attribute must be less than 10,000,000',
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-03 10:24:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'active_url'                     => 'The :attribute is not a valid URL.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'after'                          => 'The :attribute must be a date after :date.',
							 | 
						
					
						
							
								
									
										
										
										
											2021-03-22 06:40:36 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'date_after'                     => 'The start date must be before the end date.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-03 10:24:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'alpha'                          => 'The :attribute may only contain letters.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'alpha_dash'                     => 'The :attribute may only contain letters, numbers, and dashes.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'alpha_num'                      => 'The :attribute may only contain letters and numbers.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'array'                          => 'The :attribute must be an array.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'unique_for_user'                => 'There already is an entry with this :attribute.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'before'                         => 'The :attribute must be a date before :date.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-06-30 06:16:09 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'unique_object_for_user'         => 'This name is already in use.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'unique_account_for_user'        => 'This account name is already in use.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-03 10:24:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'between.numeric'                => 'The :attribute must be between :min and :max.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'between.file'                   => 'The :attribute must be between :min and :max kilobytes.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'between.string'                 => 'The :attribute must be between :min and :max characters.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'between.array'                  => 'The :attribute must have between :min and :max items.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'boolean'                        => 'The :attribute field must be true or false.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'confirmed'                      => 'The :attribute confirmation does not match.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'date'                           => 'The :attribute is not a valid date.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'date_format'                    => 'The :attribute does not match the format :format.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'different'                      => 'The :attribute and :other must be different.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'digits'                         => 'The :attribute must be :digits digits.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'digits_between'                 => 'The :attribute must be between :min and :max digits.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'email'                          => 'The :attribute must be a valid email address.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'filled'                         => 'The :attribute field is required.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'exists'                         => 'The selected :attribute is invalid.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'image'                          => 'The :attribute must be an image.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'in'                             => 'The selected :attribute is invalid.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'integer'                        => 'The :attribute must be an integer.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'ip'                             => 'The :attribute must be a valid IP address.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-11 06:41:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'json'                           => 'The :attribute must be a valid JSON string.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-03 10:24:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'max.numeric'                    => 'The :attribute may not be greater than :max.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'max.file'                       => 'The :attribute may not be greater than :max kilobytes.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'max.string'                     => 'The :attribute may not be greater than :max characters.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'max.array'                      => 'The :attribute may not have more than :max items.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'mimes'                          => 'The :attribute must be a file of type: :values.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'min.numeric'                    => 'The :attribute must be at least :min.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-09-09 07:48:17 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'lte.numeric'                    => 'The :attribute must be less than or equal :value.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-03 10:24:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'min.file'                       => 'The :attribute must be at least :min kilobytes.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'min.string'                     => 'The :attribute must be at least :min characters.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'min.array'                      => 'The :attribute must have at least :min items.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'not_in'                         => 'The selected :attribute is invalid.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'numeric'                        => 'The :attribute must be a number.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-03 05:52:27 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'numeric_native'                 => 'The native amount must be a number.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'numeric_destination'            => 'The destination amount must be a number.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'numeric_source'                 => 'The source amount must be a number.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-03 10:24:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'regex'                          => 'The :attribute format is invalid.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'required'                       => 'The :attribute field is required.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'required_if'                    => 'The :attribute field is required when :other is :value.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-11 06:41:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'required_unless'                => 'The :attribute field is required unless :other is in :values.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-03 10:24:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'required_with'                  => 'The :attribute field is required when :values is present.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'required_with_all'              => 'The :attribute field is required when :values is present.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'required_without'               => 'The :attribute field is required when :values is not present.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'required_without_all'           => 'The :attribute field is required when none of :values are present.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'same'                           => 'The :attribute and :other must match.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'size.numeric'                   => 'The :attribute must be :size.',
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-18 10:31:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'amount_min_over_max'            => 'The minimum amount cannot be larger than the maximum amount.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-03 10:24:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'size.file'                      => 'The :attribute must be :size kilobytes.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'size.string'                    => 'The :attribute must be :size characters.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'size.array'                     => 'The :attribute must contain :size items.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'unique'                         => 'The :attribute has already been taken.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-02-11 06:41:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'string'                         => 'The :attribute must be a string.',
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-03 10:24:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'url'                            => 'The :attribute format is invalid.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'timezone'                       => 'The :attribute must be a valid zone.',
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-08 05:48:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    '2fa_code'                       => 'The :attribute field is invalid.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'dimensions'                     => 'The :attribute has invalid image dimensions.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'distinct'                       => 'The :attribute field has a duplicate value.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'file'                           => 'The :attribute must be a file.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'in_array'                       => 'The :attribute field does not exist in :other.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'present'                        => 'The :attribute field must be present.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'amount_zero'                    => 'The total amount cannot be zero.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'current_target_amount'          => 'The current amount must be less than the target amount.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'unique_piggy_bank_for_user'     => 'The name of the piggy bank must be unique.',
							 | 
						
					
						
							
								
									
										
										
										
											2020-06-20 10:10:55 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'unique_object_group'            => 'The group name must be unique',
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-04 20:27:40 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'starts_with'                    => 'The value must start with :values.',
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-17 07:08:30 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'unique_webhook'                 => 'You already have a webhook with this combination of URL, trigger, response and delivery.',
							 | 
						
					
						
							
								
									
										
										
										
											2022-09-24 17:43:49 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'unique_existing_webhook'        => 'You already have another webhook with this combination of URL, trigger, response and delivery.',
							 | 
						
					
						
							
								
									
										
										
										
											2021-04-03 13:56:45 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'same_account_type'              => 'Both accounts must be of the same account type',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'same_account_currency'          => 'Both accounts must have the same currency setting',
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-13 21:35:22 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-11-08 15:17:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'secure_password'             => 'This is not a secure password. Please try again. For more information, visit https://bit.ly/FF3-password-security',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'valid_recurrence_rep_type'   => 'Invalid repetition type for recurring transactions.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'valid_recurrence_rep_moment' => 'Invalid repetition moment for this type of repetition.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'invalid_account_info'        => 'Invalid account information.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'attributes'                  => [
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-16 15:17:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'email'                   => 'email address',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'description'             => 'description',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'amount'                  => 'amount',
							 | 
						
					
						
							
								
									
										
										
										
											2020-11-08 15:17:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'transactions.*.amount'   => 'transaction amount',
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-16 15:17:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'name'                    => 'name',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'piggy_bank_id'           => 'piggy bank ID',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'targetamount'            => 'target amount',
							 | 
						
					
						
							
								
									
										
										
										
											2019-06-16 13:16:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'opening_balance_date'    => 'opening balance date',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'opening_balance'         => 'opening balance',
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-16 15:17:55 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        'match'                   => 'match',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'amount_min'              => 'minimum amount',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'amount_max'              => 'maximum amount',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'title'                   => 'title',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'tag'                     => 'tag',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'transaction_description' => 'transaction description',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-action-value.1'     => 'rule action value #1',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-action-value.2'     => 'rule action value #2',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-action-value.3'     => 'rule action value #3',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-action-value.4'     => 'rule action value #4',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-action-value.5'     => 'rule action value #5',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-action.1'           => 'rule action #1',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-action.2'           => 'rule action #2',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-action.3'           => 'rule action #3',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-action.4'           => 'rule action #4',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-action.5'           => 'rule action #5',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-trigger-value.1'    => 'rule trigger value #1',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-trigger-value.2'    => 'rule trigger value #2',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-trigger-value.3'    => 'rule trigger value #3',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-trigger-value.4'    => 'rule trigger value #4',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-trigger-value.5'    => 'rule trigger value #5',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-trigger.1'          => 'rule trigger #1',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-trigger.2'          => 'rule trigger #2',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-trigger.3'          => 'rule trigger #3',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-trigger.4'          => 'rule trigger #4',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        'rule-trigger.5'          => 'rule trigger #5',
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-12 18:44:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    ],
							 | 
						
					
						
							
								
									
										
										
										
											2019-03-31 13:36:49 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    // validation of accounts:
							 | 
						
					
						
							
								
									
										
										
										
											2020-11-08 15:17:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'withdrawal_source_need_data' => 'Need to get a valid source account ID and/or valid source account name to continue.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'withdrawal_source_bad_data'  => 'Could not find a valid source account when searching for ID ":id" or name ":name".',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'withdrawal_dest_need_data'   => 'Need to get a valid destination account ID and/or valid destination account name to continue.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'withdrawal_dest_bad_data'    => 'Could not find a valid destination account when searching for ID ":id" or name ":name".',
							 | 
						
					
						
							
								
									
										
										
										
											2019-03-31 13:36:49 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2021-08-10 18:43:21 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'generic_source_bad_data' => 'Could not find a valid source account when searching for ID ":id" or name ":name".',
							 | 
						
					
						
							
								
									
										
										
										
											2021-03-10 06:34:03 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-03-31 13:36:49 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'deposit_source_need_data' => 'Need to get a valid source account ID and/or valid source account name to continue.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'deposit_source_bad_data'  => 'Could not find a valid source account when searching for ID ":id" or name ":name".',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'deposit_dest_need_data'   => 'Need to get a valid destination account ID and/or valid destination account name to continue.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'deposit_dest_bad_data'    => 'Could not find a valid destination account when searching for ID ":id" or name ":name".',
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-08 05:48:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'deposit_dest_wrong_type'  => 'The submitted destination account is not of the right type.',
							 | 
						
					
						
							
								
									
										
										
										
											2019-03-31 13:36:49 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'transfer_source_need_data' => 'Need to get a valid source account ID and/or valid source account name to continue.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'transfer_source_bad_data'  => 'Could not find a valid source account when searching for ID ":id" or name ":name".',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'transfer_dest_need_data'   => 'Need to get a valid destination account ID and/or valid destination account name to continue.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'transfer_dest_bad_data'    => 'Could not find a valid destination account when searching for ID ":id" or name ":name".',
							 | 
						
					
						
							
								
									
										
										
										
											2019-06-02 16:33:25 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'need_id_in_edit'           => 'Each split must have transaction_journal_id (either valid ID or 0).',
							 | 
						
					
						
							
								
									
										
										
										
											2019-06-16 13:16:18 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-10-02 20:13:32 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'ob_source_need_data'           => 'Need to get a valid source account ID and/or valid source account name to continue.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'lc_source_need_data'           => 'Need to get a valid source account ID to continue.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'ob_dest_need_data'             => 'Need to get a valid destination account ID and/or valid destination account name to continue.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'ob_dest_bad_data'              => 'Could not find a valid destination account when searching for ID ":id" or name ":name".',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'reconciliation_either_account' => 'To submit a reconciliation, you must submit either a source or a destination account. Not both, not neither.',
							 | 
						
					
						
							
								
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-08 05:48:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'generic_invalid_source'      => 'You can\'t use this account as the source account.',
							 | 
						
					
						
							
								
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'generic_invalid_destination' => 'You can\'t use this account as the destination account.',
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-08 05:48:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-24 07:24:01 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'generic_no_source'      => 'You must submit source account information.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'generic_no_destination' => 'You must submit destination account information.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-08 05:48:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'gte.numeric' => 'The :attribute must be greater than or equal to :value.',
							 | 
						
					
						
							
								
									
										
										
										
											2020-07-06 06:55:27 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'gt.numeric'  => 'The :attribute must be greater than :value.',
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-08 05:48:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'gte.file'    => 'The :attribute must be greater than or equal to :value kilobytes.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'gte.string'  => 'The :attribute must be greater than or equal to :value characters.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'gte.array'   => 'The :attribute must have :value items or more.',
							 | 
						
					
						
							
								
									
										
										
										
											2020-03-13 21:35:22 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'amount_required_for_auto_budget' => 'The amount is required.',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    'auto_budget_amount_positive'     => 'The amount must be more than zero.',
							 | 
						
					
						
							
								
									
										
										
										
											2020-11-08 15:17:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    'auto_budget_period_mandatory'    => 'The auto budget period is a mandatory field.',
							 | 
						
					
						
							
								
									
										
										
										
											2015-02-06 04:39:52 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								];
							 |