Detecting short password errors and showing proper error
parent
2081194857
commit
33d723f4ec
|
@ -225,7 +225,10 @@ RegisterDirective = ($auth, $confirm, $location, $navUrls, $config) ->
|
|||
$location.path($navUrls.resolve("home"))
|
||||
|
||||
onErrorSubmit = (response) ->
|
||||
$confirm.notify("light-error", "According to our Oompa Loompas there was an error. #{response.data._error_message}") #TODO: i18n
|
||||
if response.data._error_message?
|
||||
$confirm.notify("light-error", "According to our Oompa Loompas there was an error. #{response.data._error_message}") #TODO: i18n
|
||||
|
||||
form.setErrors(response.data)
|
||||
|
||||
submit = ->
|
||||
if not form.validate()
|
||||
|
|
|
@ -16,7 +16,8 @@ div.register-form-container(tg-register)
|
|||
placeholder="Your email")
|
||||
|
||||
fieldset
|
||||
input(type="password", name="password", ng-model="data.password", data-required="true",
|
||||
input(type="password", name="password", ng-model="data.password",
|
||||
data-required="true", data-minlength="4",
|
||||
placeholder="Set a password (case sensitive)")
|
||||
|
||||
fieldset
|
||||
|
|
Loading…
Reference in New Issue