Constructor
new InputHandler(storage)
Parameters:
Name | Type | Description |
---|---|---|
storage |
Storage | Storage object. |
- Source:
Methods
isValidAmount(amount, emptyOkopt) → {bool}
Validates user inputs for amounts.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
amount |
string | The user input which should be validated. | ||
emptyOk |
bool |
<optional> |
false | Specifies whether an empty string is valid or not. |
- Source:
Returns:
True if the amount is valid, otherwise false.
- Type
- bool
isValidBudgetName(name) → {bool}
Validates user inputs for budget names.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The user input which should be validated. |
- Source:
Returns:
True if the name is valid, otherwise false.
- Type
- bool
isValidDate(day, month, year) → {bool}
Validates a given date.
Parameters:
Name | Type | Description |
---|---|---|
day |
string | The day of the date. |
month |
string | The month of the date. |
year |
string | The year of the date. |
- Source:
Returns:
True if the date is valid, else false.
- Type
- bool
isValidEntryName(name) → {bool}
Validates user inputs for transaction names.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The user input which should be validated. |
- Source:
Returns:
True if the name is valid, otherwise false.
- Type
- bool
isValidUserProfile(user)
Validates a given user profile name.
Parameters:
Name | Type | Description |
---|---|---|
user |
string | The name of the user profile. |
- Source: