validators: Remove kernel name validator
We currently don't use this validator.
This commit is contained in:
parent
1fce574146
commit
86add0ee38
1 changed files with 0 additions and 11 deletions
|
|
@ -91,17 +91,6 @@ export const isHostnameValid = (hostname: string) => {
|
|||
);
|
||||
};
|
||||
|
||||
export const isKernelNameValid = (kernelName: string) => {
|
||||
if (!kernelName) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (
|
||||
kernelName.length < 65 &&
|
||||
/^[a-z0-9]|[a-z0-9][a-z0-9-]*[a-z0-9]$/.test(kernelName)
|
||||
);
|
||||
};
|
||||
|
||||
export const isPortValid = (port: string) => {
|
||||
return /^(\d{1,5}|[a-z]{1,6})(-\d{1,5})?:[a-z]{1,6}$/.test(port);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue