mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-11-08 13:30:06 +01:00
👌 Fix regular expression
This commit is contained in:
@@ -108,7 +108,7 @@ class AddProxyVC: NSViewController, NSTextFieldDelegate {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if proxy.range(of: #"(http:\/\/|https:\/\/)(.*)(:)(\d*)"#, options: .regularExpression) == nil {
|
if proxy.range(of: #"(http:\/\/|https:\/\/)(.+)(:)(\d+)$"#, options: .regularExpression) == nil {
|
||||||
textFieldError.isHidden = false
|
textFieldError.isHidden = false
|
||||||
textFieldError.stringValue = "domain_list.add.errors.subject_invalid".localized
|
textFieldError.stringValue = "domain_list.add.errors.subject_invalid".localized
|
||||||
return false
|
return false
|
||||||
@@ -134,6 +134,9 @@ class AddProxyVC: NSViewController, NSTextFieldDelegate {
|
|||||||
inputDomainName.stringValue = inputDomainName.stringValue
|
inputDomainName.stringValue = inputDomainName.stringValue
|
||||||
.replacingOccurrences(of: " ", with: "-")
|
.replacingOccurrences(of: " ", with: "-")
|
||||||
|
|
||||||
|
inputProxySubject.stringValue = inputProxySubject.stringValue
|
||||||
|
.replacingOccurrences(of: " ", with: "-")
|
||||||
|
|
||||||
buttonCreateProxy.isEnabled = validate(
|
buttonCreateProxy.isEnabled = validate(
|
||||||
domain: inputDomainName.stringValue,
|
domain: inputDomainName.stringValue,
|
||||||
proxy: inputProxySubject.stringValue
|
proxy: inputProxySubject.stringValue
|
||||||
|
|||||||
Reference in New Issue
Block a user