Closed ETcodehome closed 7 years ago
Solves #249
Looks good, but please do not use CAPS in variables. Could you fix that? (i.e. use $sanitized_name instead of $sanitized_Name).
The rule of thumb is to stick with the existing variable name conventions. Further, the CAPS in names are used to prevent underscores (e.g. $sanitizedNames), using both underscores and CAPS is a bit of overkill :D
no worries. sorted.
thanks! Re-introduced the trim() and put it live on the server now.
You know the trim becomes extraneous right? The reg expression removes all the spaces.
From: Uncovery [mailto:notifications@github.com] Sent: Wednesday, 1 March 2017 4:55 PM To: uncovery/uncovery_me Cc: psiber-on-uncovery; Author Subject: Re: [uncovery/uncovery_me] Home names sanitised (#259)
thanks! Re-introduced the trim() and put it live on the server now.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/uncovery/uncovery_me/pull/259#issuecomment-283281646, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AP0omL9hlo70kuxYgwhtXevfH_VljzPlks5rhTJegaJpZM4MObxi.
The argument from the command might include a space at the end that the user did not even mean to put there. I don't want the regex to fail because of that and rather pretend that it's not there and remove it.
Home names checked using regex to ensure within desired ranges. Logic check for changes done by comparing sanitised string to raw input, if they don't match, error thrown as requested.