We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
idn-hostname is part of the json-schema specifications: https://json-schema.org/understanding-json-schema/reference/string.html#format
One could implement the feature like that:
public class IdnHostNameValidator implements FormatValidator { private static final IDNA idna = IDNA.getUTS46Instance(IDNA.NONTRANSITIONAL_TO_ASCII | IDNA.NONTRANSITIONAL_TO_UNICODE | IDNA.CHECK_BIDI | IDNA.CHECK_CONTEXTJ | IDNA.CHECK_CONTEXTO | IDNA.USE_STD3_RULES); @Override public Optional<String> validate(final String domain) { StringBuilder asciiDomain = new StringBuilder(); IDNA.Info info = new IDNA.Info(); idna.nameToASCII(domain, asciiDomain, info); if (info.hasErrors()) { return Optional.of(info.getErrors().toString()); } return Optional.empty(); } }
parametrizing the icu library from unicode (https://mvnrepository.com/artifact/com.ibm.icu/icu4j) with domain constraints
The text was updated successfully, but these errors were encountered:
No branches or pull requests
idn-hostname is part of the json-schema specifications: https://json-schema.org/understanding-json-schema/reference/string.html#format
One could implement the feature like that:
parametrizing the icu library from unicode (https://mvnrepository.com/artifact/com.ibm.icu/icu4j) with domain constraints
The text was updated successfully, but these errors were encountered: