<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nagatter</author_name>
  <author_url>https://blog.hatena.ne.jp/nagatter/</author_url>
  <blog_title>メモしよっと</blog_title>
  <blog_url>https://memooot.hateblo.jp/</blog_url>
  <categories>
    <anon>PHP</anon>
  </categories>
  <description>CodeIgniterのフォームバリデーション機能を使って$_POST['fieldName']の検証を行っている。 $_POST['fieldName']が未定義の時と、定義はされた上で空値が渡された時とで検証を分けたかった。 ルールリファレンスを確認したところ、未定義と空値を判別するルールはない。 requiredを使うとどちらもfalseになってしまう。 仕方がないので、ユーザー定義検証関数を作成して、以下の検証をすることにした。 ・$_POST['fieldName']が未定義の時はtrue ・$_POST['fieldName']が指定されたうえ、入力値がなかったらfalse ルール…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmemooot.hateblo.jp%2Fentry%2F20231101%2F1698835953&quot; title=&quot;$_POST[&amp;#39;fieldName&amp;#39;]未定義と空値を別々にチェックしたい - CodeIgniter - メモしよっと&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-11-01 19:52:33</published>
  <title>$_POST['fieldName']未定義と空値を別々にチェックしたい - CodeIgniter</title>
  <type>rich</type>
  <url>https://memooot.hateblo.jp/entry/20231101/1698835953</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
