We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85e44df commit b51ccfeCopy full SHA for b51ccfe
src/main/java/net/datafaker/providers/base/Credentials.java
@@ -146,11 +146,11 @@ public String weakPassword() {
146
* Generates a user ID based on the regex pattern defined in the resource file.
147
* If the regex is null or invalid, it returns null.
148
*
149
- * @return A randomly generated user ID based on the regex or null if the regex is null or invalid
+ * @return A randomly generated user ID
150
*/
151
- @Nullable
152
public String userId() {
153
- return userId(resolve("credentials.uid_pattern"));
+ String regex = resolve("credentials.uid_pattern");
+ return faker.regexify(regex);
154
}
155
156
/**
0 commit comments