I'm working on an email input form where a user inputs an email address. I need to ensure that the email address is lower-case. What i'm struggling with is that i'm able to take an array or a string and convert it into lowercase or uppercase. However because this is asking for a user to input something i've been having trouble using those same techniques.
%zip-input-md{ type: "email", "ng-model" => "vm.form.email", required: true, 'ng-maxlength' => 50, 'ng-disabled' => 'vm.form.validated_email' }
Email address
I was initially thinking that the solution was {{ lowercase_expression | lowercase}} but that only works well for existing strings.
On the back end in the controller, the vm.form.email was defined in a submitForm method.
vm.submitForm = (isValid) ->
success = ->
TokenService.post vm.form.email, vm.form.password
.then tokenServiceSuccess, tokenServiceError
.then tokenServiceFinally
return
If anybody has any good ideas, i'd really appreciate it.