mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-25 12:19:11 -04:00
ALPHA 3.0.2a
This commit is contained in:
@@ -1126,9 +1126,13 @@ trait ValidatesAttributes
|
||||
return false;
|
||||
}
|
||||
|
||||
$phpExtensions = [
|
||||
'php', 'php3', 'php4', 'php5', 'phtml',
|
||||
];
|
||||
|
||||
return ($value instanceof UploadedFile)
|
||||
? trim(strtolower($value->getClientOriginalExtension())) === 'php'
|
||||
: trim(strtolower($value->getExtension())) === 'php';
|
||||
? in_array(trim(strtolower($value->getClientOriginalExtension())), $phpExtensions)
|
||||
: in_array(trim(strtolower($value->getExtension())), $phpExtensions);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1524,7 +1528,7 @@ trait ValidatesAttributes
|
||||
((aaa|aaas|about|acap|acct|acr|adiumxtra|afp|afs|aim|apt|attachment|aw|barion|beshare|bitcoin|blob|bolo|callto|cap|chrome|chrome-extension|cid|coap|coaps|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-playcontainer|dlna-playsingle|dns|dntp|dtn|dvb|ed2k|example|facetime|fax|feed|feedready|file|filesystem|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|ham|hcp|http|https|iax|icap|icon|im|imap|info|iotdisco|ipn|ipp|ipps|irc|irc6|ircs|iris|iris.beep|iris.lwz|iris.xpc|iris.xpcs|itms|jabber|jar|jms|keyparc|lastfm|ldap|ldaps|magnet|mailserver|mailto|maps|market|message|mid|mms|modem|ms-help|ms-settings|ms-settings-airplanemode|ms-settings-bluetooth|ms-settings-camera|ms-settings-cellular|ms-settings-cloudstorage|ms-settings-emailandaccounts|ms-settings-language|ms-settings-location|ms-settings-lock|ms-settings-nfctransactions|ms-settings-notifications|ms-settings-power|ms-settings-privacy|ms-settings-proximity|ms-settings-screenrotation|ms-settings-wifi|ms-settings-workplace|msnim|msrp|msrps|mtqp|mumble|mupdate|mvn|news|nfs|ni|nih|nntp|notes|oid|opaquelocktoken|pack|palm|paparazzi|pkcs11|platform|pop|pres|prospero|proxy|psyc|query|redis|rediss|reload|res|resource|rmi|rsync|rtmfp|rtmp|rtsp|rtsps|rtspu|secondlife|s3|service|session|sftp|sgn|shttp|sieve|sip|sips|skype|smb|sms|smtp|snews|snmp|soap.beep|soap.beeps|soldat|spotify|ssh|steam|stun|stuns|submit|svn|tag|teamspeak|tel|teliaeid|telnet|tftp|things|thismessage|tip|tn3270|turn|turns|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|videotex|view-source|wais|webcal|ws|wss|wtai|wyciwyg|xcon|xcon-userid|xfire|xmlrpc\.beep|xmlrpc.beeps|xmpp|xri|ymsgr|z39\.50|z39\.50r|z39\.50s)):// # protocol
|
||||
(([\pL\pN-]+:)?([\pL\pN-]+)@)? # basic auth
|
||||
(
|
||||
([\pL\pN\pS-\.])+(\.?([\pL]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
|
||||
([\pL\pN\pS\-\.])+(\.?([\pL]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
|
||||
| # or
|
||||
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address
|
||||
| # or
|
||||
|
||||
@@ -62,6 +62,17 @@ class Rule
|
||||
return new Rules\NotIn(is_array($values) ? $values : func_get_args());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a required_if constraint builder instance.
|
||||
*
|
||||
* @param callable $callback
|
||||
* @return \Illuminate\Validation\Rules\RequiredIf
|
||||
*/
|
||||
public static function requiredIf($callback)
|
||||
{
|
||||
return new Rules\RequiredIf($callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a unique constraint builder instance.
|
||||
*
|
||||
|
||||
@@ -21,7 +21,7 @@ trait DatabaseRule
|
||||
protected $column;
|
||||
|
||||
/**
|
||||
* There extra where clauses for the query.
|
||||
* The extra where clauses for the query.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user