{json, [{error,(ErrorList)}]}
{json, [{error,list_to_binary(ErrorList)}]}
{json, [{error,io_lib:write_string(ErrorList)}]}
{json, [{error,unicode:characters_to_binary(ErrorList)}]}
Thanks
[{fun()->length(UserPassword)>7 end,"Password length must at least 8! <br>"}, {fun()->length(UserEmail)>5 end, "Invalid E-mail address! <br>"},
{fun()->boss_db:find(user_record,[{user_email,'equals',string:to_lower(UserEmail)},{id,'not_in',[Id]}])==[] end, "This e-mail address is already registered! <br>"}].
case ....:save() of{ok, _} ->
{error, E} -> {json, [{errors, E}]}
end
{ "errors": [ [ 80, 97, 115, 115, 119, 111, 114, 100, 32, 108, 101, 110, 103, 116, 104, 32, 109, 117, 115, 116, 32, 97, 116, 32, 108, 101, 97, 115, 116, 32, 56, 33, 32, 60, 98, 114, 62 ], [ 84, 104, 105, 115, 32, 101, 45, 109, 97, 105, 108, 32, 97, 100, 100, 114, 101, 115, 115, 32, 105, 115, 32, 97, 108, 114, 101, 97, 100, 121, 32, 114, 101, 103, 105, 115, 116, 101, 114, 101, 100, 33, 32, 60, 98, 114, 62 ] ]}
case ....:save() of{ok, _} ->
{error, E} -> {json, [{errors, list_to_binary(E)}]}
end
{ "errors": "Password length must at least 8! <br>This e-mail address is already registered! <br>"}