validPassword method
驗證密碼格式
Implementation
Future<PasswordValidatedResult> validPassword(String password) async {
try {
APIHttpResponse response =
await httpClient.get('/auth/valid-password', query: {
'password': password,
});
return PasswordValidatedResult.fromMap(response.data);
} catch (e) {
throw Exception('Valid password failed');
}
}