You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
/src/ROBOMERGE_ENGINE_Dev_Networking/Engine/Source/Runtime/Sockets/Private/BSDSockets/SocketsBSD.cpp - merging //UE4/Main/Engine/Source/Runtime/Sockets/Private/BSDSockets/SocketsBSD.cpp#20 -------------------------------------- Copying //UE4/Dev-Enterprise[at]4705006 to Dev-Main (//UE4/Dev-Main) #rb none #lockdown Nick.Penwarden #ROBOMERGE-OWNER: ryan.gerleve #ROBOMERGE-AUTHOR: francis.hurteau #ROBOMERGE-SOURCE: CL 4705151 in //UE4/Main/... #ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking) [CL 4712032 by ryan gerleve in Dev-Networking branch]
53 lines
1.2 KiB
C#
53 lines
1.2 KiB
C#
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
|
|
namespace nDisplayLauncher
|
|
{
|
|
public static class ValidationRules
|
|
{
|
|
public static bool IsName(string value)
|
|
{
|
|
return Regex.IsMatch(value, "^[\\w]*$") && !string.IsNullOrEmpty(value);
|
|
}
|
|
|
|
public static bool IsNameNullable(string value)
|
|
{
|
|
return Regex.IsMatch(value, "^[\\w]*$");
|
|
}
|
|
|
|
public static bool IsFloat(string value)
|
|
{
|
|
return Regex.IsMatch(value, "^[-??\\d]*(?:\\.[0-9]*)?$") && !string.IsNullOrEmpty(value);
|
|
}
|
|
|
|
public static bool IsFloatNullable(string value)
|
|
{
|
|
return Regex.IsMatch(value, "^[-??\\d]*(?:\\.[0-9]*)?$");
|
|
}
|
|
|
|
public static bool IsInt(string value)
|
|
{
|
|
return Regex.IsMatch(value, "^[\\d]*$") && !string.IsNullOrEmpty(value);
|
|
}
|
|
|
|
public static bool IsIntNullable(string value)
|
|
{
|
|
return Regex.IsMatch(value, "^[\\d]*$");
|
|
}
|
|
|
|
public static bool IsIp(string value)
|
|
{
|
|
return Regex.IsMatch(value, "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$") && !string.IsNullOrEmpty(value);
|
|
}
|
|
|
|
//is strin value address word@IpAddress
|
|
public static bool IsAddress(string value)
|
|
{
|
|
return Regex.IsMatch(value, "^\\w*@[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$");
|
|
}
|
|
|
|
}
|
|
}
|